Skip to content

Commit dde367b

Browse files
fix bug reset 2FA by admin (#238)
1 parent 925bf65 commit dde367b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

components/2FABundle/bundle/Core/SiteAccessAwareAuthenticatorResolver.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,15 @@ public function getUserAuthData(User $user)
269269

270270
public function deleteUserAuthSecretAndEmail(User $user): void
271271
{
272-
$this->userRepository->deleteUserAuthSecretAndEmail($user->getAPIUser()->getUserId(), $this->method);
272+
$authenticationMethods = [
273+
'email',
274+
'google',
275+
'totp',
276+
'microsoft',
277+
];
278+
279+
foreach ($authenticationMethods as $methodName) {
280+
$this->userRepository->deleteUserAuthSecretAndEmail($user->getAPIUser()->getUserId(), $methodName);
281+
}
273282
}
274283
}

0 commit comments

Comments
 (0)