Unverified Commit 24ded68f authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(login) Fix PHP errors in secondfactor on failed auth

issue #6146
Showing with 11 additions and 11 deletions
+11 -11
...@@ -66,19 +66,19 @@ class LoginPost extends LoginMethod ...@@ -66,19 +66,19 @@ class LoginPost extends LoginMethod
'runSchemaCheck', 'runSchemaCheck',
]); ]);
/* If needed redirect to second factor page */ if ($success) {
$secondFactor = FALSE; /* If needed redirect to second factor page */
foreach (static::$secondFactorMethods as $secondFactorMethod) { $secondFactor = FALSE;
if (!class_available($secondFactorMethod)) { foreach (static::$secondFactorMethods as $secondFactorMethod) {
continue; if (!class_available($secondFactorMethod)) {
continue;
}
$secondFactor = ($secondFactorMethod::hasSecondFactor() || $secondFactor);
}
if ($secondFactor) {
static::redirectSecondFactorPage();
} }
$secondFactor = ($secondFactorMethod::hasSecondFactor() || $secondFactor);
}
if ($secondFactor) {
static::redirectSecondFactorPage();
}
if ($success) {
/* Everything went well, redirect to main.php */ /* Everything went well, redirect to main.php */
static::redirect(); static::redirect();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment