|
dolibarr 25.0.0-alpha
|
Parent class for password rules/management modules. More...

Public Member Functions | |
| isEnabled () | |
| Return if a module can be used or not. | |
| getDescription () | |
| Return description of module. | |
| getExample () | |
| Return an example of password generated by this module. | |
| getNewGeneratedPassword () | |
| Build new password. | |
| validatePassword ($password) | |
| Validate a password. | |
Static Public Member Functions | |
| static | loadAndInstantiate ($id, $db, $conf, $langs, $user) |
| Locate, load and instantiate a password generator/validator model by its id (the value stored in USER_PASSWORD_GENERATED, e.g. | |
Parent class for password rules/management modules.
Definition at line 31 of file modules_genpassword.php.
| ModeleGenPassword::getDescription | ( | ) |
Return description of module.
Reimplemented in modGeneratePassNone, modGeneratePassPerso, and modGeneratePassStandard.
Definition at line 109 of file modules_genpassword.php.
| ModeleGenPassword::getExample | ( | ) |
Return an example of password generated by this module.
Reimplemented in modGeneratePassNone, modGeneratePassPerso, and modGeneratePassStandard.
Definition at line 120 of file modules_genpassword.php.
| ModeleGenPassword::getNewGeneratedPassword | ( | ) |
Build new password.
Reimplemented in modGeneratePassNone, modGeneratePassPerso, and modGeneratePassStandard.
Definition at line 132 of file modules_genpassword.php.
| ModeleGenPassword::isEnabled | ( | ) |
Return if a module can be used or not.
Definition at line 99 of file modules_genpassword.php.
|
static |
Locate, load and instantiate a password generator/validator model by its id (the value stored in USER_PASSWORD_GENERATED, e.g.
'standard', 'PasswordGuard'). Scans core/modules/security/generate/ plus, for each enabled module declaring module_parts['models'], its own core/modules/security/generate/ subdirectory — the same multi-root convention used by every numbering-module scan in Dolibarr (see e.g. Facture\getNextNumRef()). This lets a module contribute its own modGeneratePassXxx class from its own directory without any further core patch.
| string | $id | Generator id (value of USER_PASSWORD_GENERATED), e.g. 'standard', 'PasswordGuard' |
| DoliDB | $db | Database handler |
| Conf | $conf | Handler de conf |
| Translate | $langs | Handler de langue |
| User | $user | Handler du user connected |
Definition at line 166 of file modules_genpassword.php.
References dol_buildpath().
Referenced by FormSetupItem\generateInputFieldPassword(), getRandomPassword(), User\setPassword(), and PasswordField\verifyFieldValue().
| ModeleGenPassword::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 in modGeneratePassNone, modGeneratePassPerso, and modGeneratePassStandard.
Definition at line 145 of file modules_genpassword.php.