Galette API documentation
Gestionnaire d’Adhérents en Ligne Extrêmement Tarabiscoté mais Tellement Efficace
1.0.0
Galette\Core\Password Class Reference
Inheritance diagram for Galette\Core\Password:
Collaboration diagram for Galette\Core\Password:

Public Member Functions

 __construct (Db $zdb, bool $clean=true)
 
 generateNewPassword (int $id_adh)
 
 cleanExpired ()
 
 isHashValid (string $hash)
 
 removeHash (string $hash)
 
- Public Member Functions inherited from Galette\Core\AbstractPassword
 makeRandomPassword (int $size=null)
 
 getNewPassword ()
 
 getHash ()
 

Public Attributes

const TABLE = 'tmppasswds'
 
const PK = Adherent::PK
 
const DEFAULT_SIZE = 50
 
- Public Attributes inherited from Galette\Core\AbstractPassword
const DEFAULT_SIZE = 8
 

Protected Attributes

string $chars = 'abcdefghjkmnpqrstuvwxyz0123456789&@{[]}%#+*:ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
- Protected Attributes inherited from Galette\Core\AbstractPassword
string $chars = 'abcdefghjkmnpqrstuvwxyz0123456789'
 
string $hash = null
 
string $new_password
 

Additional Inherited Members

- Protected Member Functions inherited from Galette\Core\AbstractPassword
 setPassword (string $password)
 
 setHash (string $hash)
 

Detailed Description

Temporary password management

Author
Frédéric Jacquot gna@l.nosp@m.ogee.nosp@m.k.com
Georges Khaznadar (password encryption, images) georg.nosp@m.es@u.nosp@m.nknow.nosp@m..org
Johan Cwiklinski johan.nosp@m.@x-t.nosp@m.nd.be

Constructor & Destructor Documentation

◆ __construct()

Galette\Core\Password::__construct ( Db  $zdb,
bool  $clean = true 
)

Default constructor

Parameters
Db$zdbDatabase instance:
boolean$cleanWhether we should clean expired passwords in database

Member Function Documentation

◆ cleanExpired()

Galette\Core\Password::cleanExpired ( )

Remove expired passwords queries (older than 24 hours)

Returns
boolean

Reimplemented from Galette\Core\AbstractPassword.

◆ generateNewPassword()

Galette\Core\Password::generateNewPassword ( int  $id_adh)

Generates a new password for specified member

Parameters
int$id_adhMember identifier
Returns
boolean

Reimplemented from Galette\Core\AbstractPassword.

◆ isHashValid()

Galette\Core\Password::isHashValid ( string  $hash)

Check if requested hash is valid

Parameters
string$hashthe hash
Returns
false|int false if hash is not valid, member id otherwise

◆ removeHash()

Galette\Core\Password::removeHash ( string  $hash)

Remove a hash that has been used (ie. once password has been updated)

Parameters
string$hashhash
Returns
boolean

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