mirror of
https://github.com/nextcloud/server.git
synced 2026-03-27 04:43:20 -04:00
Improve provider check
Check if there is a provider missing. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
c8778d83fb
commit
04fa36d411
1 changed files with 5 additions and 1 deletions
|
|
@ -100,7 +100,11 @@ class TwoFactorMiddleware extends Middleware {
|
|||
if ($controller instanceof ALoginSetupController
|
||||
&& $this->userSession->getUser() !== null
|
||||
&& $this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) {
|
||||
return;
|
||||
$providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser());
|
||||
|
||||
if ($providers->getProviders() === [] && !$providers->isProviderMissing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ($controller instanceof LoginController && $methodName === 'logout') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue