dolibarr 21.0.0-alpha
modGeneratePassStandard Class Reference

Class to generate a password according to a dolibarr standard rule (12 random chars) More...

Inheritance diagram for modGeneratePassStandard:
Collaboration diagram for modGeneratePassStandard:

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 This function is called by User->setPassword() and internally to validate that the password matches the constraints.
 
- Public Member Functions inherited from ModeleGenPassword
 isEnabled ()
 Return if a module can be used or not.
 

Detailed Description

Class to generate a password according to a dolibarr standard rule (12 random chars)

Definition at line 32 of file modGeneratePassStandard.class.php.

Constructor & Destructor Documentation

◆ __construct()

modGeneratePassStandard::__construct ( $db,
$conf,
$langs,
$user )

Constructor.

Parameters
DoliDB$dbDatabase handler
Conf$confHandler de conf
Translate$langsHandler de langue
User$userHandler du user connected

Definition at line 49 of file modGeneratePassStandard.class.php.

References conf(), and user.

Member Function Documentation

◆ getDescription()

modGeneratePassStandard::getDescription ( )

Return description of module.

Returns
string Description of module

Reimplemented from ModeleGenPassword.

Definition at line 66 of file modGeneratePassStandard.class.php.

◆ getExample()

modGeneratePassStandard::getExample ( )

Return an example of password generated by this module.

Returns
string Example of password

Reimplemented from ModeleGenPassword.

Definition at line 77 of file modGeneratePassStandard.class.php.

References getNewGeneratedPassword().

◆ getNewGeneratedPassword()

modGeneratePassStandard::getNewGeneratedPassword ( )

Build new password.

Returns
string Return a new generated password

Reimplemented from ModeleGenPassword.

Definition at line 87 of file modGeneratePassStandard.class.php.

References dol_strlen().

Referenced by getExample().

◆ validatePassword()

modGeneratePassStandard::validatePassword ( $password)

Validate a password This function is called by User->setPassword() and internally to validate that the password matches the constraints.

Parameters
string$passwordPassword to check
Returns
int 0 if KO, >0 if OK

Reimplemented from ModeleGenPassword.

Definition at line 124 of file modGeneratePassStandard.class.php.

References dol_strlen().


The documentation for this class was generated from the following file: