@@ -145,9 +145,9 @@ |
||
| 145 | 145 | // check DB for token. |
| 146 | 146 | try { |
| 147 | 147 | $count = DB::table('2fa_tokens') |
| 148 | - ->where('token', $token) |
|
| 149 | - ->where('expires_at', '>', $time) |
|
| 150 | - ->where('user_id', $this->getUser()->id)->count(); |
|
| 148 | + ->where('token', $token) |
|
| 149 | + ->where('expires_at', '>', $time) |
|
| 150 | + ->where('user_id', $this->getUser()->id)->count(); |
|
| 151 | 151 | } catch (QueryException $e) { |
| 152 | 152 | $count = 0; |
| 153 | 153 | } |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | // check DB for token. |
| 31 | 31 | try { |
| 32 | 32 | DB::table('2fa_tokens') |
| 33 | - ->where('token', $token) |
|
| 34 | - ->where('user_id', $event->user->id)->delete(); |
|
| 33 | + ->where('token', $token) |
|
| 34 | + ->where('user_id', $event->user->id)->delete(); |
|
| 35 | 35 | } catch (QueryException $e) { |
| 36 | 36 | Log::error('Could not delete user token from database.'); |
| 37 | 37 | } |