@@ -62,7 +62,7 @@ |
||
| 62 | 62 | |
| 63 | 63 | $usedToken = null; |
| 64 | 64 | foreach ($scratchTokens as $scratchToken) { |
| 65 | - if (password_verify($data, $scratchToken)){ |
|
| 65 | + if (password_verify($data, $scratchToken)) { |
|
| 66 | 66 | $usedToken = $scratchToken; |
| 67 | 67 | SessionAlert::quick("Hey, it looks like you used a scratch token to log in. Would you like to change your multi-factor authentication configuration?", 'alert-warning'); |
| 68 | 68 | WebRequest::setPostLoginRedirect($this->getConfiguration()->getBaseUrl() . "/internal.php/multiFactor"); |
@@ -44,7 +44,8 @@ |
||
| 44 | 44 | $userObj = User::getByUsername($filterUser, $database); |
| 45 | 45 | if ($userObj !== false) { |
| 46 | 46 | $logSearch->byUser($userObj->getId()); |
| 47 | - } else { |
|
| 47 | + } |
|
| 48 | + else { |
|
| 48 | 49 | $logSearch->byUser(-1); |
| 49 | 50 | } |
| 50 | 51 | } |
@@ -72,7 +72,8 @@ |
||
| 72 | 72 | if ($targetVar !== null && preg_match('/^[a-z]+$/', $targetVar)) { |
| 73 | 73 | $data = $targetVar . ' = ' . $data . ';'; |
| 74 | 74 | header("Content-Type: text/javascript"); |
| 75 | - } else { |
|
| 75 | + } |
|
| 76 | + else { |
|
| 76 | 77 | header("Content-Type: application/json"); |
| 77 | 78 | } |
| 78 | 79 | |