Description: Class for handling passwort recovery

author Timo Trautmann
copyright four for business AG <www.4fb.de>

 Methods

Constructor of RequestPassword initializes class variables

RequestPassword(object $oDb, array $aCfg) 

access public

Parameters

$oDb

object
  • The contenido database object

$aCfg

array
  • The contenido configuration array

Function generates new password

generatePassword() : string

access private

Returns

string- the new password

Function checks password request for errors an delegate request to setNewPassword() if there is no error

handleNewPassword() 

access private

Function displays form for password request and sets new password, if password is submitted this function also starts the passwort change an sending process

renderForm() 

access public

Function sets new password for user and sets last request time to now

setNewPassword() 

access private

Function submits new password to users mail adress

submitMail(string $sPassword) 

access private

Parameters

$sPassword

string
  • the new password

 Properties

 

The contenido configuration array

$aCfg : array

access private
 

Definies if passwort request is enabled or disabled.

$bIsEnabled : boolean

Default: This feature is enabled

access private
 

Length of new passwort, which is generated automatically

$iPassLength : integer

access private
 

Time in minutes after which user is allowed to request a new password

$iReloadTime : integer

access private
 

The contenido database object

$oDb : object

access private
 

The contenido template object

$oTpl : object

access private
 

E-mail address of user which requests password

$sEmail : string

access private
 

Host of mailserver, which sends new password via mail

$sMailhost : string

access private
 

E-mail address of the sender

$sSendermail : string

access private
 

Name of the sender

$sSendername : string

access private
 

Username of user which requests password

$sUsername : string

access private