mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Добавлены тесты для включения/отключения OTP
This commit is contained in:
@@ -61,7 +61,7 @@ class TwoFactorAuthForm extends ApiForm {
|
||||
}
|
||||
|
||||
public function activate(): bool {
|
||||
if (!$this->validate()) {
|
||||
if ($this->scenario !== self::SCENARIO_ACTIVATE || !$this->validate()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class TwoFactorAuthForm extends ApiForm {
|
||||
}
|
||||
|
||||
public function disable(): bool {
|
||||
if (!$this->validate()) {
|
||||
if ($this->scenario !== self::SCENARIO_DISABLE || !$this->validate()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user