Skip to content

Commit

Permalink
Merge pull request nextcloud#28596 from nextcloud/backport/28262/stab…
Browse files Browse the repository at this point in the history
…le22

[stable22] Fix setting up 2FA providers when 2FA is enforced and bc are generated
  • Loading branch information
artonge authored Aug 26, 2021
2 parents 34b5d97 + 0629b58 commit cfe553e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/Middleware/TwoFactorMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function beforeController($controller, $methodName) {
&& !$this->reflector->hasAnnotation('TwoFactorSetUpDoneRequired')) {
$providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser());

if (!($providers->getProviders() === [] && !$providers->isProviderMissing())) {
if (!($providers->getPrimaryProviders() === [] && !$providers->isProviderMissing())) {
throw new TwoFactorAuthRequiredException();
}
}
Expand Down

0 comments on commit cfe553e

Please sign in to comment.