Skip to content

Commit 60c0e30

Browse files
committed
allow changing identityClass in config. [issue101]
1 parent 7e177d9 commit 60c0e30

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

models/forms/LoginForm.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ public function getUser()
105105
{
106106
if ( $this->_user === false )
107107
{
108-
$this->_user = User::findByUsername($this->username);
108+
$u = new \Yii::$app->user->identityClass;
109+
$this->_user = ($u instanceof User ? $u->findByUsername($this->username) : User::findByUsername($this->username));
109110
}
110111

111112
return $this->_user;

0 commit comments

Comments
 (0)