Skip to content

Commit

Permalink
DisableTwoFactorAuthentication should always set `two_factor_confir…
Browse files Browse the repository at this point in the history
…med_at` to `null` when it has a value (#589)

fixes #588
  • Loading branch information
crynobone authored Jan 17, 2025
1 parent 74cd44b commit ee35e5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Actions/DisableTwoFactorAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __invoke($user)
$user->forceFill([
'two_factor_secret' => null,
'two_factor_recovery_codes' => null,
] + (Fortify::confirmsTwoFactorAuthentication() ? [
] + (Fortify::confirmsTwoFactorAuthentication() || ! is_null($user->two_factor_confirmed_at) ? [
'two_factor_confirmed_at' => null,
] : []))->save();

Expand Down

0 comments on commit ee35e5b

Please sign in to comment.