LoginForm
extends Model
in package
Login form
Table of Contents
- $password : mixed
- $rememberMe : mixed
- $username : mixed
- $user : mixed
- login() : bool
- Logs in a user using the provided username and password.
- rules() : mixed
- {@inheritdoc}
- validatePassword() : mixed
- Validates the password.
- getUser() : User|null
- Finds user by [[username]]
Properties
$password
public
mixed
$password
$rememberMe
public
mixed
$rememberMe
= true
$username
public
mixed
$username
$user
private
mixed
$user
Methods
login()
Logs in a user using the provided username and password.
public
login() : bool
Return values
bool —whether the user is logged in successfully
rules()
{@inheritdoc}
public
rules() : mixed
Return values
mixed —validatePassword()
Validates the password.
public
validatePassword(string $attribute, array<string|int, mixed> $params) : mixed
This method serves as the inline validation for password.
Parameters
- $attribute : string
-
the attribute currently being validated
- $params : array<string|int, mixed>
-
the additional name-value pairs given in the rule
Tags
Return values
mixed —getUser()
Finds user by [[username]]
protected
getUser() : User|null