| Conditions | 7 |
| Paths | 12 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function authorize() |
||
| 21 | { |
||
| 22 | $userVerified = $this->user() && $this->user()->email_verified; |
||
| 23 | $guestVerified = ($email = $this->get('email')) && ($user = User::where('email', $email)->first()) && $user->email_verified; |
||
|
|
|||
| 24 | |||
| 25 | if ($userVerified || $guestVerified) { |
||
| 26 | // Redirect users if their email already verified, no need to process their request |
||
| 27 | throw new GenericException(trans('cortex/fort::messages.verification.email.already'), $userVerified ? route('frontend.account.settings') : route('frontend.auth.login')); |
||
| 28 | } |
||
| 29 | |||
| 30 | return true; |
||
| 31 | } |
||
| 32 | |||
| 59 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.