@@ -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 | } |
@@ -31,8 +31,8 @@ |
||
31 | 31 | if (null !== $event->user) { |
32 | 32 | try { |
33 | 33 | DB::table('2fa_tokens') |
34 | - ->where('token', $token) |
|
35 | - ->where('user_id', $event->user->id)->delete(); |
|
34 | + ->where('token', $token) |
|
35 | + ->where('user_id', $event->user->id)->delete(); |
|
36 | 36 | } catch (QueryException $e) { |
37 | 37 | Log::error('Could not delete user token from database.'); |
38 | 38 | } |