Skip to content

Commit 12162eb

Browse files
authored
Merge pull request #674 from M4ttoF/648-update
Now resends verification email for account recovery
2 parents 444b53b + adfd736 commit 12162eb

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

app/app/Http/Controllers/PasswordRecoveryController.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ public function sendEmail(Request $request)
3636
return view('pages.password_recovery.unmatched_email');
3737
}
3838

39+
if( $matching_user->email_verification_time == null) {
40+
$confirmationLink = BaseUser::generateConfirmationLink($matching_user);
41+
Mail::send(new ConfirmationMail(
42+
$matching_user->first_name,
43+
$matching_user->email,
44+
$confirmationLink
45+
));
46+
$confirmMsg = 'A verification code has been sent to ' . $matching_user->email .
47+
'. Check your email inbox or SPAM folder to confirm.';
48+
return view('pages.signup.success', [
49+
'email' => $matching_user->email,
50+
'confirmmessage' => $confirmMsg,
51+
'can_sign_in' => false
52+
]);
53+
}
3954
//Generate Password Recovery Link
4055
$token = str_random(60);
4156
$recoveryLink = config('app.url')."/user/password-recovery/".$matching_user->email."/".$token;

0 commit comments

Comments
 (0)