diff options
author | MichaIng <micha@dietpi.com> | 2021-12-19 21:42:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-19 21:42:03 +0300 |
commit | d9a3d0eb22816a3f79f281bd98ab0df2dbc6888e (patch) | |
tree | d8114959ef7d2b59b6d22610efa16838f62f4575 /core | |
parent | f68269f32c27379f5710b24a01c4ade7b460c3e2 (diff) | |
parent | ad525199188c572fe5b9428973b557ce0ebf6ac6 (diff) |
Merge pull request #30250 from nextcloud/backport/30193/stable22
[stable22] Fix setting up 2FA when no providers are set up but backup codes
Diffstat (limited to 'core')
-rw-r--r-- | core/Middleware/TwoFactorMiddleware.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php index 4c13a99a1aa..47b09536acd 100644 --- a/core/Middleware/TwoFactorMiddleware.php +++ b/core/Middleware/TwoFactorMiddleware.php @@ -109,7 +109,7 @@ class TwoFactorMiddleware extends Middleware { && $this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) { $providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser()); - if ($providers->getProviders() === [] && !$providers->isProviderMissing()) { + if ($providers->getPrimaryProviders() === [] && !$providers->isProviderMissing()) { return; } } |