| 1 | <?php |
||
| 9 | trait AuthenticatesUsers |
||
| 10 | { |
||
| 11 | use \Illuminate\Foundation\Auth\AuthenticatesUsers { |
||
| 12 | attemptLogin as baseAttemptLogin; |
||
| 13 | } |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Attempt to log the user into the application. |
||
| 17 | * |
||
| 18 | * @param \Illuminate\Http\Request $request |
||
| 19 | * @return bool |
||
| 20 | * @throws ValidationException |
||
| 21 | */ |
||
| 22 | protected function attemptLogin(Request $request) |
||
| 23 | { |
||
| 24 | if ($this->guard()->validate($this->credentials($request))) { |
||
| 25 | $user = $this->guard()->getLastAttempted(); |
||
|
|
|||
| 26 | |||
| 27 | if (! is_null($user->confirmed_at)) { |
||
| 28 | return $this->baseAttemptLogin($request); |
||
| 29 | } |
||
| 30 | |||
| 31 | session([ |
||
| 32 | 'confirmation_user_id' => $user->getKey() |
||
| 33 | ]); |
||
| 34 | |||
| 35 | throw ValidationException::withMessages([ |
||
| 36 | 'confirmation' => [ |
||
| 37 | __('confirmation::confirmation.not_confirmed', [ |
||
| 38 | 'resend_link' => route('auth.resend_confirmation') |
||
| 39 | ]) |
||
| 40 | ] |
||
| 41 | ]); |
||
| 42 | } |
||
| 43 | return false; |
||
| 44 | } |
||
| 45 | } |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.