Class common\models\LoginForm

Inheritancecommon\models\LoginForm » yii\base\Model

Login form

Public Methods

Hide inherited methods

MethodDescriptionDefined By
login() Logs in a user using the provided username and password. common\models\LoginForm
rules() common\models\LoginForm
validatePassword() Validates the password. common\models\LoginForm

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
getUser() Finds user by $username common\models\LoginForm

Property Details

$password public property
public $password null
$rememberMe public property
public $rememberMe true
$username public property
public $username null

Method Details

getUser() protected method

Finds user by $username

protected common\models\User|null getUser ( )
login() public method

Logs in a user using the provided username and password.

public boolean login ( )
return boolean

Whether the user is logged in successfully

rules() public method

public void rules ( )
validatePassword() public method

Validates the password.

This method serves as the inline validation for password.

public void validatePassword ( $attribute, $params )
$attribute string

The attribute currently being validated

$params array

The additional name-value pairs given in the rule