aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMichaIng <micha@dietpi.com>2021-12-19 19:41:20 +0100
committerGitHub <noreply@github.com>2021-12-19 19:41:20 +0100
commitcdedd2df38f11faf8343c52dfbf36673d04efc72 (patch)
tree47b40272c15ebfc59dbbedeff40728931210e575 /core
parent4b8b2b4740b46e096e7defd2724f75ff2edc1e9a (diff)
parente4011bc3aa713c0c2901a152df9b67935b7989ef (diff)
downloadnextcloud-server-cdedd2df38f11faf8343c52dfbf36673d04efc72.tar.gz
nextcloud-server-cdedd2df38f11faf8343c52dfbf36673d04efc72.zip
Merge pull request #30252 from nextcloud/backport/30193/stable23
[stable23] 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 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;
}
}