Просмотр исходного кода

Problème connexion User de type LEGAL_PERSON #560

prodstable
Guillaume Bourgeois 2 лет назад
Родитель
Сommit
f29cd8b62f
1 измененных файлов: 7 добавлений и 1 удалений
  1. +7
    -1
      common/models/LoginForm.php

+ 7
- 1
common/models/LoginForm.php Просмотреть файл

@@ -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;

Загрузка…
Отмена
Сохранить