Skip to content

Commit

Permalink
stop sending email verification if user already verified (#25540)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfa6661 authored and taylorotwell committed Sep 10, 2018
1 parent bdd0113 commit f3a5760
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Foundation/Auth/VerifiesEmails.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public function verify(Request $request)
*/
public function resend(Request $request)
{
if ($request->user()->hasVerifiedEmail()) {
return redirect($this->redirectPath());
}

$request->user()->sendEmailVerificationNotification();

return back()->with('resent', true);
Expand Down

0 comments on commit f3a5760

Please sign in to comment.