Class app\models\LoginForm
| Inheritance | app\models\LoginForm » yii\base\Model |
|---|
LoginForm is the model behind the login form.
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $password | app\models\LoginForm | ||
| $rememberMe | app\models\LoginForm | ||
| $username | app\models\LoginForm |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getUser() | Finds user by $username | app\models\LoginForm |
| login() | Logs in a user using the provided username and password. | app\models\LoginForm |
| rules() | app\models\LoginForm | |
| validatePassword() | Validates the password. | app\models\LoginForm |
Property Details
Method Details
Finds user by $username
| public app\models\User|null getUser ( ) |
Logs in a user using the provided username and password.
| public boolean login ( ) | ||
| return | boolean | Whether the user is logged in successfully |
|---|---|---|
| public array rules ( ) | ||
| return | array | The validation rules. |
|---|---|---|
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 |