Display this
{else}Display that
{/if} Show passwords ^^^^^^^^^^^^^^ You can add an icon on password fields that will allow user to see the cleartext password by clicking on it: .. code-block:: php $show_pwd = true; Debug ----- You can turn on debug mode with ``$debug``: .. code-block:: php $debug = true; .. tip:: Debug messages will be printed in server logs. You can adjust the debug level by using PHP predefined constants in ``$debug_level``: .. code-block:: php $debug_level = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_WARNING; This is also possible to enable Smarty debug, for web interface issues: .. code-block:: php $smarty_debug = true; .. tip:: Debug messages will appear on web interface as a popup. You will also have many more messages in error logs. .. _security: Security -------- You need a key phrase if you use ciphered tokens (see :ref:`config_tokens`) .. code-block:: php $keyphrase = "secret"; There is also a protection on login to avoid LDAP injections. Some characters are forbidden, you can change the list of forbidden characters in login with ``$login_forbidden_chars``: .. code-block:: php $login_forbidden_chars = "*()&|"; .. tip:: If no characters are configured in ``$login_forbidden_chars``, only alphanumeric characters are allowed. For the reset process via mail token and send sms token, errors are hidden by default, to avoid account disclosure: .. code-block:: php $obscure_usernotfound_sendtoken = true; $obscure_notfound_sendsms = true; Set these parameter to ``false`` if you want to show an error if the information of the account entered by the user do not exist in the directory. Default action -------------- By default, the password change page is displayed. You can configure which page should be displayed when no action is defined: .. code-block:: php $default_action = "change"; Possibles values are: - ``change`` - ``sendtoken`` - ``sendsms`` - ``changecustompwdfield`` (to specify which custom password field, set ``$default_custompwdindex`` to the desired number, i.e. ``$default_custompwdindex = 1;``) You can disable the standard password change if you don't need it: .. code-block:: php $use_change = false; In this case, be sure to also remove "change" from default action, else the change page will still be displayed. Prefill user login ------------------ If Self Service Password is called from another application, you can prefill the login by sending an HTTP header. To enable this feature, configure the name of the HTTP header: .. code-block:: php $header_name_preset_login = "Auth-User"; It is also possible to prefill the login by using the ``login_hint`` GET or POST parameter. This method does not require any configuration. Example: ``https://ssp.example.com/?actionresetbyquestions&login_hint=spiderman`` .. _config_captcha: Captcha ------- To enable captcha, set ``$use_captcha`` to ``true``. You should also define the captcha module to use. (By default, ``InternalCaptcha`` is defined in config.inc.php) .. code-block:: php $use_captcha = true; $captcha_class = "InternalCaptcha"; .. tip:: The captcha is used on every form in Self Service Password (password change, token, questions,...) For ``$captcha_class``, you can select another captcha module. For now, only ``InternalCaptcha``, ``FriendlyCaptcha`` and ``ReCaptcha`` are supported. If you want to set up ``ReCaptcha``, you must also configure additional parameters: .. code-block:: php $use_captcha = true; $captcha_class = "ReCaptcha"; $recaptcha_url = "https://www.google.com/recaptcha/api/siteverify"; $recaptcha_sitekey = "sitekey"; $recaptcha_secretkey = "secretkey"; $recaptcha_minscore = 0.5; See `ReCaptcha documentation