Skip to content

Commit

Permalink
Merge pull request #339 from VSP-Technologies/support-email-verificat…
Browse files Browse the repository at this point in the history
…ion-and-two-factor

fix #233
  • Loading branch information
jeffgreco13 authored Mar 2, 2024
2 parents cee88e8 + bace9de commit e7a9aa4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/BreezyCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ public function verify(string $code, ?Authenticatable $user = null)

public function shouldForceTwoFactor(): bool
{
if ($this->getCurrentPanel()->isEmailVerificationRequired()) {
return $this->forceTwoFactorAuthentication && ! $this->auth()->user()?->hasConfirmedTwoFactor() && $this->auth()->user()?->hasVerifiedEmail();
}

return $this->forceTwoFactorAuthentication && ! $this->auth()->user()?->hasConfirmedTwoFactor();
}

Expand Down

0 comments on commit e7a9aa4

Please sign in to comment.