mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Мигрирована логика блокировки аккаунтов
This commit is contained in:
@ -55,7 +55,11 @@ class LoginForm extends ApiForm {
|
||||
// TODO: проверить, не заблокирован ли аккаунт
|
||||
if (!$this->hasErrors()) {
|
||||
$account = $this->getAccount();
|
||||
if ($account->status !== Account::STATUS_ACTIVE) {
|
||||
if ($account->status === Account::STATUS_BANNED) {
|
||||
$this->addError($attribute, E::ACCOUNT_BANNED);
|
||||
}
|
||||
|
||||
if ($account->status === Account::STATUS_REGISTERED) {
|
||||
$this->addError($attribute, E::ACCOUNT_NOT_ACTIVATED);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user