@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * Make a JSON response. |
| 15 | 15 | * |
| 16 | - * @param $statusCode |
|
| 16 | + * @param integer $statusCode |
|
| 17 | 17 | * |
| 18 | 18 | * @return IlluminateJsonResponse |
| 19 | 19 | */ |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | /** |
| 47 | 47 | * Make a web response. |
| 48 | 48 | * |
| 49 | - * @param $statusCode |
|
| 49 | + * @param integer $statusCode |
|
| 50 | 50 | * |
| 51 | 51 | * @return \Illuminate\Http\Response |
| 52 | 52 | */ |
@@ -103,5 +103,10 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | abstract public function getRequest(); |
| 105 | 105 | |
| 106 | + /** |
|
| 107 | + * @param string $string |
|
| 108 | + * |
|
| 109 | + * @return string|null |
|
| 110 | + */ |
|
| 106 | 111 | abstract protected function config($string, $children = []); |
| 107 | 112 | } |
@@ -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 | } |