@@ -70,11 +70,11 @@ discard block |
||
70 | 70 | $default_url = route(HomePage::class); |
71 | 71 | $username = Validator::parsedBody($request)->string('username'); |
72 | 72 | $password = Validator::parsedBody($request)->string('password', ''); |
73 | - $loginstage = Validator::parsedBody($request)->string('loginstage', '1'); |
|
73 | + $loginstage = Validator::parsedBody($request)->string('loginstage', '1'); |
|
74 | 74 | $codemfa = Validator::parsedBody($request)->string('codemfa', ''); |
75 | 75 | $url = Validator::parsedBody($request)->isLocalUrl()->string('url', $default_url); |
76 | 76 | $mfastatus = Validator::parsedBody($request)->string('mfastatus', '0'); |
77 | - $mfasuccess = Validator::parsedBody($request)->string('mfasuccess', '0'); |
|
77 | + $mfasuccess = Validator::parsedBody($request)->string('mfasuccess', '0'); |
|
78 | 78 | |
79 | 79 | try { |
80 | 80 | $user = $this->user_service->findByIdentifier($username); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | Log::addAuthenticationLog('Login failed (not approved by admin): ' . $username); |
154 | 154 | throw new Exception(I18N::translate('This account has not been approved. Please wait for an administrator to approve it.')); |
155 | 155 | } |
156 | - if ($user->getPreference(UserInterface::PREF_IS_STATUS_MFA) === "1" && (bool)Site::getPreference('SHOW_2FA_OPTION')) { |
|
156 | + if ($user->getPreference(UserInterface::PREF_IS_STATUS_MFA) === "1" && (bool) Site::getPreference('SHOW_2FA_OPTION')) { |
|
157 | 157 | # MFA switched on for site and has been enabled by user |
158 | 158 | return "1"; |
159 | 159 | } else { |
@@ -276,7 +276,7 @@ |
||
276 | 276 | ->where('user_id', '=', $this->id()) |
277 | 277 | ->value('secret'); |
278 | 278 | $google2fa = new Google2FA(); |
279 | - if ((bool)$google2fa->verifyKey($secret, $codemfa)) { |
|
279 | + if ((bool) $google2fa->verifyKey($secret, $codemfa)) { |
|
280 | 280 | return true; |
281 | 281 | } |
282 | 282 | return false; |