dolibarr 21.0.0-alpha
ModeleGenPassword Class Reference

Parent class for password rules/management modules. More...

Inheritance diagram for ModeleGenPassword:

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.
 

Detailed Description

Parent class for password rules/management modules.

Definition at line 31 of file modules_genpassword.php.

Member Function Documentation

◆ getDescription()

ModeleGenPassword::getDescription ( )

Return description of module.

Returns
string Description of text

Reimplemented in modGeneratePassNone, modGeneratePassPerso, and modGeneratePassStandard.

Definition at line 96 of file modules_genpassword.php.

◆ getExample()

ModeleGenPassword::getExample ( )

Return an example of password generated by this module.

Returns
string Example of password

Reimplemented in modGeneratePassNone, modGeneratePassPerso, and modGeneratePassStandard.

Definition at line 107 of file modules_genpassword.php.

◆ getNewGeneratedPassword()

ModeleGenPassword::getNewGeneratedPassword ( )

Build new password.

Returns
string Return a new generated password

Reimplemented in modGeneratePassNone, modGeneratePassPerso, and modGeneratePassStandard.

Definition at line 119 of file modules_genpassword.php.

◆ isEnabled()

ModeleGenPassword::isEnabled ( )

Return if a module can be used or not.

Returns
boolean true if module can be used

Definition at line 86 of file modules_genpassword.php.

◆ validatePassword()

ModeleGenPassword::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 in modGeneratePassNone, modGeneratePassPerso, and modGeneratePassStandard.

Definition at line 132 of file modules_genpassword.php.


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