Skip to content

Commit ee35e5b

Browse files
authored
DisableTwoFactorAuthentication should always set two_factor_confirmed_at to null when it has a value (#589)
fixes #588
1 parent 74cd44b commit ee35e5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Actions/DisableTwoFactorAuthentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function __invoke($user)
2121
$user->forceFill([
2222
'two_factor_secret' => null,
2323
'two_factor_recovery_codes' => null,
24-
] + (Fortify::confirmsTwoFactorAuthentication() ? [
24+
] + (Fortify::confirmsTwoFactorAuthentication() || ! is_null($user->two_factor_confirmed_at) ? [
2525
'two_factor_confirmed_at' => null,
2626
] : []))->save();
2727

0 commit comments

Comments
 (0)