ModeleGenPassword
abstract class ModeleGenPassword (View source)
Parent class for password rules/management modules
Properties
| string | $id | ||
| string | $version | ||
| string | $picto | ||
| int | $WithoutAmbi | Flag to 1 if we must clean ambiguous characters for the autogeneration of password (List of ambiguous char is in $this->Ambi) |
|
| string | $error | ||
| DoliDB | $db | ||
| Conf | $conf | ||
| Translate | $langs | ||
| User | $user | ||
| string | $length | Minimum length (text visible by end user) |
|
| int | $length2 | Minimum length in number of characters |
Methods
Return if a module can be used or not
Return description of module
Return an example of password generated by this module
Build new password
Validate a password.
Details
isEnabled()
Return if a module can be used or not
@return boolean true if module can be used
getDescription()
Return description of module
@return string Description of text
getExample()
Return an example of password generated by this module
@return string Example of password
getNewGeneratedPassword()
Build new password
@return string Return a new generated password
validatePassword(string $password)
Validate a password.
This function is called by User->setPassword() and internally to validate that the password matches the constraints.