| 1 |
Password reset by mail |
| 2 |
====================== |
| 3 |
|
| 4 |
Presentation |
| 5 |
------------ |
| 6 |
|
| 7 |
LL::NG can propose a password reset form, for users who loose their |
| 8 |
password (this kind of application is also called a self service |
| 9 |
password interface). |
| 10 |
|
| 11 |
**Kinematics:** |
| 12 |
|
| 13 |
- User clicks on the link ``Reset my password`` |
| 14 |
- User provides his email address (or another information) in password reset form |
| 15 |
- LL::NG try to find the user in users database with the provided information |
| 16 |
- An email contening a token is sent to the user |
| 17 |
- The user clicks on the link in the mail |
| 18 |
- LL::NG validates the token and proposes a password change form |
| 19 |
- The user can choose a password or ask to generate a new one |
| 20 |
- The new password is sent to user by mail if user ask to generate one, |
| 21 |
else the sent mail only confirms that the password has been successfully changed |
| 22 |
|
| 23 |
|
| 24 |
.. tip:: |
| 25 |
|
| 26 |
If :doc:`LDAP backend<authldap>` is used and LDAP password policy is enabled, |
| 27 |
'password reset' flag is set to true when password is generated. |
| 28 |
So user is forced to change his password at next connection. |
| 29 |
This feature can be disabled in :doc:`LDAP configuration<authldap>`. |
| 30 |
|
| 31 |
|
| 32 |
.. tip:: |
| 33 |
|
| 34 |
If the user performs a new password reset request when a request is already pending, |
| 35 |
the user can ask the confirmation mail to be resent. Request validity time can be set. |
| 36 |
|
| 37 |
Configuration |
| 38 |
------------- |
| 39 |
|
| 40 |
**Requirements** |
| 41 |
|
| 42 |
- You have to activate the 'password reset' button in the login page. |
| 43 |
Go in Manager, ``General Parameters`` » ``Portal`` » ``Customization`` » ``Buttons on login page`` » ``Reset password``. |
| 44 |
See :ref:`portal customization<portalcustom-other-parameters>`. |
| 45 |
|
| 46 |
- The SMTP server must be setup. See :doc:`SMTP server setup<smtp>`. |
| 47 |
|
| 48 |
**Manager Configuration** |
| 49 |
|
| 50 |
Go in Manager, ``General Parameters`` » ``Plugins`` » ``Password management``: |
| 51 |
|
| 52 |
- **Mail content:** |
| 53 |
|
| 54 |
- **Success mail subject**: subject of mail sent when password is changed (default: [LemonLDAP::NG] Your new password) |
| 55 |
- **Success mail content** (optional): content of mail sent when password is changed |
| 56 |
- **Confirmation mail subject**: subject of mail sent when password |
| 57 |
change is asked (default: [LemonLDAP::NG] Password reset confirmation) |
| 58 |
- **Confirmation mail content** (optional): content of mail sent when password change is asked |
| 59 |
|
| 60 |
|
| 61 |
.. attention:: |
| 62 |
|
| 63 |
By default, mail content are empty in order to use HTML templates: |
| 64 |
|
| 65 |
- portal/templates/common/mail_confirm.tpl |
| 66 |
- portal/templates/common/mail_password.tpl |
| 67 |
|
| 68 |
If you define mail contents in Manager, HTML templates will not be used. |
| 69 |
|
| 70 |
You can use session attributes in success mail body like `$uid` or `$password`. |
| 71 |
|
| 72 |
You can use session attributes in confirmation mail body like `$uid` or the following technical variables: `$url`, `$expMailDate` and `$expMailTime`. |
| 73 |
Variables will be replaced by their corresponding value. |
| 74 |
|
| 75 |
|
| 76 |
- **Other:** |
| 77 |
|
| 78 |
- **Reset password page URL**: URL of password reset page (default: [PORTAL]/resetpwd) |
| 79 |
- **Validity time of a password reset request**: number of seconds |
| 80 |
for password reset request validity. During this period, user can |
| 81 |
ask the confirmation mail to be resent (default: session timeout value) |
| 82 |
- **Max reset password retries**: number of retries allowed for resetting password |
| 83 |
- **Display generate password box**: display a checkbox to allow |
| 84 |
user to generate a new password instead of choosing one (default: |
| 85 |
disabled) |
| 86 |
- **Regexp for password generation**: regular expression used to generate the password. Set a blank value to use |
| 87 |
password policy if enabled or default regexp will be employed: [A-Z]{3}[a-z]{5}.\\d{2} |
| 88 |
|