|
dolibarr
16.0.1
|
Class to generate a password according to personal rules. More...
Inheritance diagram for modGeneratePassPerso:
Collaboration diagram for modGeneratePassPerso:Public Member Functions | |
| __construct ($db, $conf, $langs, $user) | |
| Constructor. More... | |
| getDescription () | |
| Return description of module. More... | |
| getExample () | |
| Return an example of password generated by this module. More... | |
| getNewGeneratedPassword () | |
| Build new password. More... | |
| validatePassword ($password) | |
| Validate a password. More... | |
| consecutiveIterationSameCharacter ($password) | |
| Check the consecutive iterations of the same character. More... | |
Public Member Functions inherited from ModeleGenPassword | |
| isEnabled () | |
| Return if a module can be used or not. More... | |
| getDescription () | |
| Return description of module. More... | |
| getExample () | |
| Return an example of password generated by this module. More... | |
| getNewGeneratedPassword () | |
| Build new password. More... | |
| validatePassword ($password) | |
| Validate a password. More... | |
Private Member Functions | |
| initAll () | |
| Init the property ->All and clean ->Maj, ->Min, ->Nb and ->Spe with list of valid chars. More... | |
Class to generate a password according to personal rules.
Definition at line 33 of file modGeneratePassPerso.class.php.
| modGeneratePassPerso::__construct | ( | $db, | |
| $conf, | |||
| $langs, | |||
| $user | |||
| ) |
| modGeneratePassPerso::consecutiveIterationSameCharacter | ( | $password | ) |
Check the consecutive iterations of the same character.
| string | $password | Password to check |
Definition at line 261 of file modGeneratePassPerso.class.php.
References initAll().
Referenced by validatePassword().
| modGeneratePassPerso::getDescription | ( | ) |
Return description of module.
Definition at line 143 of file modGeneratePassPerso.class.php.
| modGeneratePassPerso::getExample | ( | ) |
Return an example of password generated by this module.
Definition at line 154 of file modGeneratePassPerso.class.php.
References getNewGeneratedPassword().
| modGeneratePassPerso::getNewGeneratedPassword | ( | ) |
Build new password.
Definition at line 164 of file modGeneratePassPerso.class.php.
References initAll(), and validatePassword().
Referenced by getExample().
|
private |
Init the property ->All and clean ->Maj, ->Min, ->Nb and ->Spe with list of valid chars.
Definition at line 125 of file modGeneratePassPerso.class.php.
Referenced by consecutiveIterationSameCharacter(), getNewGeneratedPassword(), and validatePassword().
| modGeneratePassPerso::validatePassword | ( | $password | ) |
Validate a password.
This function is called by User->setPassword() and internally to validate that the password matches the constraints.
| string | $password | Password to check |
Definition at line 205 of file modGeneratePassPerso.class.php.
References consecutiveIterationSameCharacter(), dol_strlen(), and initAll().
Referenced by getNewGeneratedPassword().