summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMichaIng <micha@dietpi.com>2021-12-20 18:42:40 +0100
committerGitHub <noreply@github.com>2021-12-20 18:42:40 +0100
commita45a9bf860f8fba1fbbd132a6036d977323cec00 (patch)
tree6192fa0124f0584fdb4f1801753ca9338ca5cbfa /core
parent92744f30479b13915f17cde22d0fc88d718ae322 (diff)
parent22ebbba8e663fd549939cf050b515178348e9823 (diff)
downloadnextcloud-server-a45a9bf860f8fba1fbbd132a6036d977323cec00.tar.gz
nextcloud-server-a45a9bf860f8fba1fbbd132a6036d977323cec00.zip
Merge pull request #30251 from nextcloud/backport/30193/stable21
[stable21] Fix setting up 2FA when no providers are set up but backup codes
Diffstat (limited to 'core')
-rw-r--r--core/Middleware/TwoFactorMiddleware.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php
index a6c8a131cee..795b9b56a9e 100644
--- a/core/Middleware/TwoFactorMiddleware.php
+++ b/core/Middleware/TwoFactorMiddleware.php
@@ -110,7 +110,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;
}
}