Bladeren bron

Problème connexion User de type LEGAL_PERSON #560

refactoring
Guillaume Bourgeois 2 jaren geleden
bovenliggende
commit
f29cd8b62f
1 gewijzigde bestanden met toevoegingen van 7 en 1 verwijderingen
  1. +7
    -1
      common/models/LoginForm.php

+ 7
- 1
common/models/LoginForm.php Bestand weergeven

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

Laden…
Annuleren
Opslaan