Use Yii::$app->user->login result in LoginForm
This commit is contained in:
parent
302b25026c
commit
abb1a10b89
@ -50,8 +50,7 @@ class LoginForm extends Model
|
||||
{
|
||||
if ($this->validate()) {
|
||||
$user = $this->getUserByUsername($this->username);
|
||||
Yii::$app->user->login($user, $this->rememberMe ? 3600*24*30 : 0);
|
||||
return true;
|
||||
return Yii::$app->user->login($user, $this->rememberMe ? 3600*24*30 : 0);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user