Update app/controllers/shared/api.php

Co-authored-by: Jake Barnby <jakeb994@gmail.com>
This commit is contained in:
Bradley Schofield
2024-04-23 16:34:12 +09:00
committed by GitHub
parent 3d17b64eac
commit 089af4e137
+1 -1
View File
@@ -290,7 +290,7 @@ App::init()
$minimumFactors = ($mfaEnabled && $hasMoreFactors) ? 2 : 1;
if (!in_array('mfa', $route->getGroups())) {
if ($session && !empty($session->getAttribute('factors')) && \count($session->getAttribute('factors')) < $minimumFactors) {
if ($session && \count($session->getAttribute('factors', [])) < $minimumFactors) {
throw new Exception(Exception::USER_MORE_FACTORS_REQUIRED);
}
}