27require_once DOL_DOCUMENT_ROOT.
'/core/lib/security2.lib.php';
48 public $picto =
'generic';
55 public $WithoutAmbi = 0;
114 return $langs->trans(
"NoDescription");
125 $langs->load(
"bills");
126 return $langs->trans(
"NoExample");
137 return $langs->trans(
"NotAvailable");
182 $classname =
'modGeneratePass'.ucfirst($id);
184 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
185 foreach ($dirmodels as $reldir) {
186 $file =
dol_buildpath($reldir.
'core/modules/security/generate/').$classname.
'.class.php';
187 if (is_file($file)) {
189 if (class_exists($classname)) {
190 return new $classname($db, $conf, $langs, $user);
Parent class for password rules/management modules.
getDescription()
Return description of module.
static loadAndInstantiate($id, $db, $conf, $langs, $user)
Locate, load and instantiate a password generator/validator model by its id (the value stored in USER...
isEnabled()
Return if a module can be used or not.
validatePassword($password)
Validate a password.
getExample()
Return an example of password generated by this module.
getNewGeneratedPassword()
Build new password.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
isPasswordGenerationNoneForbidden()
Return if the 'none' password generation model (the one that applies no rule at all) is forbidden on ...