mirror of
https://github.com/elyby/accounts.git
synced 2026-10-20 20:58:03 +05:30
Добавлено отдельное сообщение для авторизации в Minecraft, если у аккаунта включена двухфакторная аутентификация
This commit is contained in:
1 parent
40239b4ee5
commit
f86be5688b
2 files changed
+19
-1
No files matched your search
@@ -35,7 +35,10 @@ class AuthenticationForm extends Form {
|
||||
$loginForm->password = $this->password;
|
||||
if (!$loginForm->validate()) {
|
||||
$errors = $loginForm->getFirstErrors();
|
||||
if (isset($errors['login'])) {
|
||||
if (isset($errors['token'])) {
|
||||
Authserver::error("User with login = '{$this->username}' protected by two factor auth.");
|
||||
throw new ForbiddenOperationException('Account protected with two factor auth.');
|
||||
} elseif (isset($errors['login'])) {
|
||||
if ($errors['login'] === E::ACCOUNT_BANNED) {
|
||||
Authserver::error("User with login = '{$this->username}' is banned");
|
||||
throw new ForbiddenOperationException('This account has been suspended.');
|
||||
|
||||
Reference in new issue
Block a user