Differences

This shows you the differences between two versions of the page.

Link to this comparison view

documentation:self-service-password:0.8:config_questions [2017/01/25 12:09] (current)
Line 1: Line 1:
 +====== Reset by questions ======
 +
 +<​note>​Configuration file: ''​self-service-password/​conf/​config.inc.php''</​note>​
 +
 +===== How it works? =====
 +
 +First, the user should choose a question and register an answer. This answer will be stored in an attribute of its LDAP entry with this syntax:
 +<​code>​
 +{questionid}answer
 +</​code>​
 +
 +<note important>​You should configure your LDAP directory to protect this data, to be only accessed by Self Service Password.</​note>​
 +
 +<note warning>​The data will be written by the user or by the manager, depending on ''​$who_change_password''​ parameter.</​note>​
 +
 +Then, the user can reset its password by entering its answer and setting a new password.
 +
 +===== Activation =====
 +
 +You can enable or disable this feature with ''​$use_questions'':​
 +<file php>
 +$use_questions = true;
 +</​file>​
 +
 +===== Attribute and object class =====
 +
 +Set the attribute in which the answer will be stored:
 +<file php>
 +$answer_attribute = "​info";​
 +</​file>​
 +
 +If the above attribute is not in a standard user object class, configure the object class to use with this attribute:
 +<file php>
 +$answer_objectClass = "​extensibleObject";​
 +</​file>​
 +
 +<​note>​The object class will be added to the entry only if it is not already present.</​note>​
 +
 +<note important>​
 +On Active Directory, extensibleObject is not known. You can use for example:
 +<file php>
 +$answer_attribute = "​comment";​
 +$answer_objectClass = "​user";​
 +</​file>​
 +</​note>​
 +
 +===== Edit questions =====
 +
 +Questions are registered in lang files: ''​lang/​**codelang**.inc.php''​.
 +
 +To add a question, you can create a new value in the ''​$messages['​questions'​]''​ array, directly in the main configuration files (''​config.inc.php''​):​
 +<file php>
 +$messages['​questions'​]['​ice'​] = "What is your favorite ice cream flavor?";​
 +</​file>​