If the user did not login by 2fa completely, the cookie still stores the incomplete status. Then if you remove 2fa, the user’s cookie still redirect user to the second factor authentication. You need to remove cookie for your site.
If you disable 2FA, you better re-generate all scripts (not just the login pages) again, otherwise the security system and the login page still read the 2FA configuration and tries to post the first factor authenticator (login1fa).
The 2FA login status is stored in cookie and session, not in the user table’s profile field, so you cannot reset in the user page page. User can logout and clear cookie to remove the status.
The problem is probably due to the memory problem you posted, you may post the complete log (stack trace) for discussion.
The log file should contain more detailed log (stack trace) leading to the final error. Double check your php.ini settings, make sure they are properly set, do not skip. If the log file does not log more info, check the PHP’s log file (the one that you specify by error_log in php.ini).
// create the authentication token
$authenticatedToken = $authenticator->createToken($passport, $this->firewallName);
after runnng through various functions:
it appears the login routine gets into a loop in AdvancedSecurity.php
between functions:
public function getUserLevelHierarchy(int|string $userLevelId): array
public function getAllUserLevelsFromHierarchy(int|string|null $userLevelId): array
in particular the line
$userLevelSubIds = $this->getAllUserLevelsFromHierarchy($userLevel); // Add sub levels in getAllUserLevelsFromHierarchy() is causing the loop
so it looks like it is looping adding sub-levels – which the accounts don’t have they use a single level
the $userLevelId of these uses is 210
$userLevels[0] toggles between null and 210 on each iteration
they must have made a code change, the function does not recognize a single UserLevelID value set in the field.
in our table userlevelID is set to 210 – its a string field to support multiple values, but only a single level is used. its been this way in our code for years, never had to specify “|” with a single entry.
now the code doesn’t see a single level, unless you specifically add the value separator “|” so now its “210|” in the table, and the login works.
this also now breaks displaying your users table because of the “|” in the field, which is interfering the SQL statement.