dolibarr 20.0.0
|
Class to generate a password according to personal rules. More...
Public Member Functions | |
__construct ($db, $conf, $langs, $user) | |
Constructor. | |
getDescription () | |
Return description of module. | |
getExample () | |
Return an example of password generated by this module. | |
getNewGeneratedPassword () | |
Build new password. | |
validatePassword ($password) | |
Validate a password. | |
consecutiveIterationSameCharacter ($password) | |
Check the consecutive iterations of the same character. | |
Public Member Functions inherited from ModeleGenPassword | |
isEnabled () | |
Return if a module can be used or not. | |
Private Member Functions | |
initAll () | |
Init the property ->All and clean ->Maj, ->Min, ->Nb and ->Spe with list of valid chars. | |
Class to generate a password according to personal rules.
Definition at line 34 of file modGeneratePassPerso.class.php.
modGeneratePassPerso::__construct | ( | $db, | |
$conf, | |||
$langs, | |||
$user ) |
Constructor.
DoliDB | $db | Database handler |
Conf | $conf | Handler de conf |
Translate | $langs | Handler de langue |
User | $user | Handler du user connected |
Definition at line 70 of file modGeneratePassPerso.class.php.
References conf(), dolibarr_set_const(), getDolGlobalString(), and user.
modGeneratePassPerso::consecutiveIterationSameCharacter | ( | $password | ) |
Check the consecutive iterations of the same character.
string | $password | Password to check |
Definition at line 243 of file modGeneratePassPerso.class.php.
References initAll().
Referenced by validatePassword().
modGeneratePassPerso::getDescription | ( | ) |
Return description of module.
Reimplemented from ModeleGenPassword.
Definition at line 123 of file modGeneratePassPerso.class.php.
modGeneratePassPerso::getExample | ( | ) |
Return an example of password generated by this module.
Reimplemented from ModeleGenPassword.
Definition at line 134 of file modGeneratePassPerso.class.php.
References getNewGeneratedPassword().
modGeneratePassPerso::getNewGeneratedPassword | ( | ) |
Build new password.
@phan-suppress PhanPossiblyInfiniteRecursionSameParams
Reimplemented from ModeleGenPassword.
Definition at line 146 of file modGeneratePassPerso.class.php.
References getNewGeneratedPassword(), initAll(), and validatePassword().
Referenced by getExample(), and getNewGeneratedPassword().
|
private |
Init the property ->All and clean ->Maj, ->Min, ->Nb and ->Spe with list of valid chars.
Definition at line 105 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 |
Reimplemented from ModeleGenPassword.
Definition at line 187 of file modGeneratePassPerso.class.php.
References consecutiveIterationSameCharacter(), dol_strlen(), and initAll().
Referenced by getNewGeneratedPassword().