@@ -121,7 +121,13 @@ class LoginForm extends Model | |||
public function getUser() | |||
{ | |||
if ($this->_user === false) { | |||
$this->_user = User::findOne(['email' => $this->email, 'type' => User::TYPE_INDIVIDUAL]); | |||
$this->_user = User::searchOne( | |||
['email' => $this->email], | |||
[ | |||
'conditions' => 'type LIKE :type_individual OR type LIKE :type_legal_person', | |||
'params' => [':type_individual' => User::TYPE_INDIVIDUAL, ':type_legal_person' => User::TYPE_LEGAL_PERSON] | |||
] | |||
); | |||
} | |||
return $this->_user; |