| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php namespace JobApis\JobsToMail\Jobs\Auth; |
||
| 29 | 1 | public function handle(UserRepositoryInterface $users) |
|
| 30 | { |
||
| 31 | // Get the user by email |
||
| 32 | 1 | $user = $users->getByEmail($this->email); |
|
| 33 | |||
| 34 | // Generate a token and send it to the user |
||
| 35 | 1 | $user->notify(new LoginTokenGenerated($users->generateToken($user->id, 'login'))); |
|
| 36 | |||
| 37 | 1 | return new FlashMessage( |
|
| 38 | 1 | 'alert-success', |
|
| 39 | 1 | 'We have sent a login token to you. Please check your email.' |
|
| 40 | ); |
||
| 41 | } |
||
| 42 | } |
||
| 43 |