summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2013-04-15 02:32:52 +0200
committerAndrey Andreev <narf@bofh.bg>2013-04-15 02:32:52 +0200
commit31da423ebba877984675e7232f100842d58b6dfc (patch)
tree52532260b5589f3e7d461c75dcd4b8721aece299 /user_guide_src
parent5eb1cbfa673bfa4b8a66ab8a56389a279c1f975b (diff)
parentffe1bd215fe64dc054296ed8aa1ac253bbf1962b (diff)
Merge pull request #2396 from abkr/develop
Add options in create_captcha() to specify the randomly generated captcha word length and character pool
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/helpers/captcha_helper.rst5
2 files changed, 5 insertions, 1 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 65e210761..742dacbae 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -105,6 +105,7 @@ Release Date: Not Released
- :doc:`Directory Helper <helpers/directory_helper>` :php:func:`directory_map()` will now append ``DIRECTORY_SEPARATOR`` to directory names in the returned array.
- :doc:`Language Helper <helpers/language_helper>` :php:func:`lang()` now accepts an optional list of additional HTML attributes.
- Deprecated the :doc:`Email Helper <helpers/email_helper>` as its ``valid_email()``, ``send_email()`` functions are now only aliases for PHP native functions ``filter_var()`` and ``mail()`` respectively.
+ - :doc:`CAPTCHA Helper <helpers/captcha_helper>` :php:func:`create_captcha` added word_length and pool options for setting length of randomly generated captcha word, and what characters to select from.
- Database
diff --git a/user_guide_src/source/helpers/captcha_helper.rst b/user_guide_src/source/helpers/captcha_helper.rst
index 17462a8de..ca24e011f 100644
--- a/user_guide_src/source/helpers/captcha_helper.rst
+++ b/user_guide_src/source/helpers/captcha_helper.rst
@@ -62,7 +62,9 @@ Once loaded you can generate a captcha like this::
'font_path' => './path/to/fonts/texb.ttf',
'img_width' => '150',
'img_height' => 30,
- 'expiration' => 7200
+ 'expiration' => 7200,
+ 'word_length' => 8,
+ 'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
);
$cap = create_captcha($vals);
@@ -79,6 +81,7 @@ Once loaded you can generate a captcha like this::
- The **expiration** (in seconds) signifies how long an image will remain
in the captcha folder before it will be deleted. The default is two
hours.
+- **word_length** defaults to 8, **pool** defaults to '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
Adding a Database
-----------------