contenido\classes\class.request.password.php

Show: PublicProtectedPrivateinherited
Table of Contents
Project: Contenido Content Management System

Description: Class for handling passwort recovery for backend users. If a user has set his e-mail address, this class generates a new Password for user and submits to his e-mail adress. Submitting a new Password is only possible every 30 minutes Mailsender, Mailsendername and Mailserver are set into system properties. There it is also possible to deactivate this feature.

Requirements:

Author
Timo Trautmann  
Con_php_req
5.0  
Copyright
four for business AG  
License
http://www.contenido.org/license/LIZENZ.txt  
Link
http://www.4fb.de  
Link
http://www.contenido.org  
Package
Contenido Backend classes  
Since
file available since 2008-03-20 {@internal created 2008-03-20 modified 2008-06-30, Dominik Ziegler, add security fix modified 2010-05-27, Oliver Lohkemper, check if user activ in handleNewPassword() modified 2011-02-26, Ortwin Pinke, added temporary pw request behaviour, so user may login with old and/or requested pw $Id: class.request.password.php 1309 2011-02-26 14:32:42Z oldperl $: }}  
Version
1.1.0  

\RequestPassword

Package: Default
Description: Class for handling passwort recovery
Author
Timo Trautmann  
Copyright
four for business AG  

Properties

>VPropertypublicarray $aCfg
The contenido configuration array
Details
Type
array
Access
private  
>VPropertypublicboolean $bIsEnabled
Definies if passwort request is enabled or disabled.

Default: This feature is enabled

Details
Type
boolean
Access
private  
>VPropertypublicinteger $iPassLength
Length of new passwort, which is generated automatically
Details
Type
integer
Access
private  
>VPropertypublicinteger $iReloadTime
Time in minutes after which user is allowed to request a new password
Details
Type
integer
Access
private  
>VPropertypublicobject $oDb
The contenido database object
Details
Type
object
Access
private  
>VPropertypublicobject $oTpl
The contenido template object
Details
Type
object
Access
private  
>VPropertypublicstring $sEmail
E-mail address of user which requests password
Details
Type
string
Access
private  
>VPropertypublicstring $sMailhost
Host of mailserver, which sends new password via mail
Details
Type
string
Access
private  
>VPropertypublicstring $sSendermail
E-mail address of the sender
Details
Type
string
Access
private  
>VPropertypublicstring $sSendername
Name of the sender
Details
Type
string
Access
private  
>VPropertypublicstring $sUsername
Username of user which requests password
Details
Type
string
Access
private  

Methods

methodpublicRequestPassword(object $oDb, array $aCfg) : void

Constructor of RequestPassword initializes class variables

Parameters
NameTypeDescription
$oDbobject
  • The contenido database object
$aCfgarray
  • The contenido configuration array
Details
Access
public  
methodpublicgeneratePassword() : string

Function generates new password

Returns
TypeDescription
string- the new password
Details
Access
private  
methodpublichandleNewPassword() : void

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

Details
Access
private  
methodpublicrenderForm() : void

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

Details
Access
public  
methodpublicsetNewPassword() : void

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

Details
Access
private  
methodpublicsubmitMail(string $sPassword) : void

Function submits new password to users mail adress

Parameters
NameTypeDescription
$sPasswordstring
  • the new password
Details
Access
private  
Documentation was generated by phpDocumentor 2.0.0a12.