mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Updated 2FA error message response
This commit is contained in:
parent
4d4e3745f1
commit
e87c618778
@ -30,8 +30,6 @@ class SmtpController extends BaseController
|
||||
$user = auth()->user();
|
||||
$company = $user->company();
|
||||
|
||||
|
||||
|
||||
config([
|
||||
'mail.mailers.smtp' => [
|
||||
'transport' => 'smtp',
|
||||
|
@ -72,6 +72,10 @@ class TwoFactorController extends BaseController
|
||||
return response()->json(['message' => ctrans('texts.enabled_two_factor')], 200);
|
||||
} elseif (! $secret || ! $google2fa->verifyKey($secret, $oneTimePassword)) {
|
||||
return response()->json(['message' => ctrans('texts.invalid_one_time_password')], 400);
|
||||
}elseif (! $user->phone) {
|
||||
return response()->json(['message' => ctrans('texts.set_phone_for_two_factor')], 400);
|
||||
} elseif (! $user->isVerified()) {
|
||||
return response()->json(['message' => 'Please confirm your account first'], 400);
|
||||
}
|
||||
|
||||
return response()->json(['message' => 'No phone record or user is not confirmed'], 400);
|
||||
|
Loading…
Reference in New Issue
Block a user