Skip to content

Commit f2e738d

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Actions/DisableTwoFactorAuthentication.php

+1-1
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)