\LoginForm

LoginForm class.

LoginForm is the data structure for keeping user login form data. It is used by the 'login' action of 'SiteController'.

Summary

Methods
Properties
Constants
rules()
attributeLabels()
authenticate()
login()
$username
$password
$rememberMe
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$_identity
N/A

Properties

$username

$username : 

Type

$password

$password : 

Type

$rememberMe

$rememberMe : 

Type

$_identity

$_identity : 

Type

Methods

rules()

rules() 

Declares the validation rules.

The rules state that username and password are required, and password needs to be authenticated.

attributeLabels()

attributeLabels() 

Declares attribute labels.

authenticate()

authenticate(  $attribute,   $params) 

Authenticates the password.

This is the 'authenticate' validator as declared in rules().

Parameters

$attribute
$params

login()

login() : boolean

Logs in the user using the given username and password in the model.

Returns

boolean —

whether login is successful