EmailConfirmationService $emailConfirmationService,
LoginService $loginService,
UserRepo $userRepo
- )
- {
+ ) {
$this->emailConfirmationService = $emailConfirmationService;
$this->loginService = $loginService;
$this->userRepo = $userRepo;
/**
* Shows a notice that a user's email address has not been confirmed,
* Also has the option to re-send the confirmation email.
- *
- * @return View
*/
public function showAwaiting()
{
- return view('auth.user-unconfirmed');
+ $user = $this->loginService->getLastLoginAttemptUser();
+
+ return view('auth.user-unconfirmed', ['user' => $user]);
}
/**
public function resend(Request $request)
{
$this->validate($request, [
- 'email' => 'required|email|exists:users,email',
+ 'email' => ['required', 'email', 'exists:users,email'],
]);
$user = $this->userRepo->getByEmail($request->get('email'));