We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a844133 commit 9ab9f9fCopy full SHA for 9ab9f9f
1 file changed
models/forms/LoginForm.php
@@ -105,7 +105,8 @@ public function getUser()
105
{
106
if ( $this->_user === false )
107
108
- $this->_user = User::findByUsername($this->username);
+ $u = new \Yii::$app->user->identityClass;
109
+ $this->_user = ($u instanceof User ? $u->findByUsername($this->username) : User::findByUsername($this->username));
110
}
111
112
return $this->_user;
0 commit comments