TOTPSecondaryAuthenticationProvider: Avoid use of getModule()

Change-Id: Iec9be88a8e189b84263e0b2f567d7288b4e4321e
This commit is contained in:
Taavi Väänänen 2024-11-05 20:53:08 +02:00
parent ffe501d64f
commit bd4f71a97d
No known key found for this signature in database
GPG key ID: EF242F709F912FBE

View file

@ -67,7 +67,7 @@ class TOTPSecondaryAuthenticationProvider extends AbstractSecondaryAuthenticatio
public function beginSecondaryAuthentication( $user, array $reqs ) {
$authUser = $this->userRepository->findByUser( $user );
if ( !( $authUser->getModule() instanceof TOTP ) ) {
if ( !$this->module->isEnabled( $authUser ) ) {
return AuthenticationResponse::newAbstain();
}