Skip to content

Commit

Permalink
[8.x] Updated EmailVerificationRequest.php to check if user is not al…
Browse files Browse the repository at this point in the history
…ready verified (#35174)

* updated EmailVerificationRequest.php to check if user is not already verified

* Update EmailVerificationRequest.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
ScriptingBeating and taylorotwell authored Nov 10, 2020
1 parent cf5dbed commit c1f6591
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Illuminate/Foundation/Auth/EmailVerificationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ public function rules()
*/
public function fulfill()
{
$this->user()->markEmailAsVerified();
if (! $this->user()->hasVerifiedEmail()) {
$this->user()->markEmailAsVerified();

event(new Verified($this->user()));
event(new Verified($this->user()));
}
}

/**
Expand Down

0 comments on commit c1f6591

Please sign in to comment.