diff options
author | Andrey Andreev <narf@bofh.bg> | 2013-04-15 02:32:52 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2013-04-15 02:32:52 +0200 |
commit | 31da423ebba877984675e7232f100842d58b6dfc (patch) | |
tree | 52532260b5589f3e7d461c75dcd4b8721aece299 /user_guide_src/source/helpers | |
parent | 5eb1cbfa673bfa4b8a66ab8a56389a279c1f975b (diff) | |
parent | ffe1bd215fe64dc054296ed8aa1ac253bbf1962b (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/source/helpers')
-rw-r--r-- | user_guide_src/source/helpers/captcha_helper.rst | 5 |
1 files changed, 4 insertions, 1 deletions
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 ----------------- |