before testing verification mecanisum
This commit is contained in:
1 parent
ab2d458387
commit
af567c2c5f
10 files changed
+147
-35
No files matched your search
@@ -34,6 +34,13 @@ class AuthenticatedSessionController extends Controller
|
||||
if (Auth::attempt($credentials)) {
|
||||
$request->session()->regenerate();
|
||||
|
||||
if (!$request->user()->hasVerifiedEmail()) {
|
||||
Auth::logout();
|
||||
return redirect()->route('verification.notice')->withErrors([
|
||||
'email' => 'You need to verify your email address before logging in.',
|
||||
]);
|
||||
}
|
||||
|
||||
return redirect()->route('family.dashboard');
|
||||
}
|
||||
|
||||
|
||||
@@ -61,8 +61,6 @@ class RegisteredUserController extends Controller
|
||||
// Send welcome email
|
||||
Mail::to($user->email)->send(new WelcomeEmail($user, $user, null));
|
||||
|
||||
Auth::login($user);
|
||||
|
||||
return redirect()->route('login')->with('success', 'Registration successful! Please login with your credentials.');
|
||||
return redirect()->route('verification.notice')->with('success', 'Registration successful! Please check your email to verify your account.');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user