1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-29 10:38:08 +01:00

Merge pull request #4864 from Jimmi08/patch-2

Fixes #4860 and correct fix for #3983 - correct second authorization
This commit is contained in:
Cameron 2022-09-29 12:11:16 -07:00 committed by GitHub
commit 6af11ec71c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,9 +117,9 @@ class userlogin
$authMethod[0] = varset($pref['auth_method'], 'e107'); // Primary authentication method
$authMethod[1] = varset($pref['auth_method2'], 'none'); // Secondary authentication method (if defined)
$result = false;
foreach ($authMethod as $method)
foreach ($authMethod as $key => $method)
{
if ($method == 'e107' OR $method == 'e107db')
if ($method == 'e107')
{
if ($this->lookupUser($username, $forceLogin))
{
@ -161,6 +161,9 @@ class userlogin
$authorized = true;
break;
case LOGIN_TRY_OTHER:
if ($key === array_key_last($authMethod)) {
return $this->invalidLogin($username,LOGIN_ABORT);
}
continue 2;
break;
}