27require_once DOL_DOCUMENT_ROOT.
'/core/lib/security2.lib.php';
48 public $position = 50;
53 public $picto =
'generic';
60 public $WithoutAmbi = 0;
119 return $langs->trans(
"NoDescription");
130 $langs->load(
"bills");
131 return $langs->trans(
"NoExample");
142 return $langs->trans(
"NotAvailable");
187 $classname =
'modGeneratePass'.ucfirst($id);
189 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
190 foreach ($dirmodels as $reldir) {
191 $file =
dol_buildpath($reldir.
'core/modules/security/generate/').$classname.
'.class.php';
192 if (is_file($file)) {
194 if (class_exists($classname)) {
195 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 ...