Untility methods to add common Auth/Login elements to an authentication form

author Barry O'Donovan
author The Skilled Team of PHP Developers at Open Solutions
category OSS
package OSS_Form
copyright Copyright (c) 2007 - 2012, Open Source Solutions Limited, Dublin, Ireland
license New BSD License

 Methods

A utility function for creating a standard 'lost password' button link.

createLostPasswordElement(string $name) : \OSS_Form_Element_Buttonlink
Static

Parameters

$name

string

The element name

Returns

\OSS_Form_Element_Buttonlink- The button link element

A utility function for creating a standard 'lost username' button link.

createLostUsernameElement(string $name) : \OSS_Form_Element_Buttonlink
Static

Parameters

$name

string

The element name

Returns

\OSS_Form_Element_Buttonlink- The button link element

A utility function for creating a standard password confirmation element

createPasswordConfirmElement(string $name, string $pwname) : \Zend_Form_Element_Password
Static

Also adds a validator to match it to the password field

Parameters

$name

string

The element name

$pwname

string

The matching password element name

Returns

\Zend_Form_Element_PasswordThe password element

A utility function for creating a standard password element for login forms.

createPasswordElement(string $name) : \Zend_Form_Element_Password
Static

Parameters

$name

string

The element name

Returns

\Zend_Form_Element_PasswordThe password element

A utility function for creating a standard password reset token element

createPasswordResetTokenElement(string $name) : \Zend_Form_Element_Text
Static

Parameters

$name

string

The element name

Returns

\Zend_Form_Element_TextThe password reset token element

A utility function for creating a standard 'remember me' element for login forms.

createRememberMeElement(string $name) : \Zend_Form_Element_Checkbox
Static

Parameters

$name

string

The element name

Returns

\Zend_Form_Element_CheckboxThe remember me element

A utility function for creating a standard 'return to login' button link.

createReturnToLoginElement(string $name) : \OSS_Form_Element_Buttonlink
Static

Parameters

$name

string

The element name

Returns

\OSS_Form_Element_Buttonlink- The button link element

A utility function for creating a standard username element for login forms.

createUsernameElement(string $type, string $name) : \Zend_Form_Element_Text
Static

You must specify the type (USERNAME_TYPE_EMAIL or USERNAME_TYPE_NONEMAIL and this will add additional validators, etc.

Parameters

$type

string

The type of username expected

$name

string

The element name

Returns

\Zend_Form_Element_TextThe username element

 Constants

 

USERNAME_TYPE_EMAIL

USERNAME_TYPE_EMAIL 
 

USERNAME_TYPE_NONEMAIL

USERNAME_TYPE_NONEMAIL