Conditions | 3 |
Paths | 5 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | protected function getUserFromEncryptedToken($encryptedToken) |
||
39 | { |
||
40 | try { |
||
41 | $token = decrypt($encryptedToken); |
||
42 | [$userId, $token] = explode('|', $token); |
||
43 | $user = User::query()->findOrFail($userId); |
||
44 | } catch (Throwable $exception) { |
||
45 | return false; |
||
46 | } |
||
47 | if (Cache::get("password.reset.{$userId}") != $token) { |
||
48 | return false; |
||
49 | } |
||
50 | |||
51 | return $user; |
||
52 | } |
||
53 | } |
||
54 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.