25 require_once DOL_DOCUMENT_ROOT.
'/core/modules/security/generate/modules_genpassword.php';
61 $this->
id =
"standard";
66 $this->langs = $langs;
78 return $langs->trans(
"PasswordGenerationStandard", $this->length);
102 $possible =
"0123456789bcdfghjkmnpqrstvwxyz";
108 while ($i < $this->length)
111 $char = substr($possible, mt_rand(0,
dol_strlen($possible) - 1), 1);
114 if (!strstr($password, $char))
133 if (
dol_strlen($password) < $this->length)
return 0;
Parent class for password rules/management modules.
conf($dolibarr_main_document_root)
Load conf file (file must exists)
$conf db
API class for accounts.
__construct($db, $conf, $langs, $user)
Constructor.
validatePassword($password)
Validate a password.
dol_strlen($string, $stringencoding= 'UTF-8')
Make a strlen call.
getNewGeneratedPassword()
Build new password.
Class to generate a password according to a dolibarr standard rule (8 random chars) ...
getExample()
Return an example of password generated by this module.
getDescription()
Return description of module.