do not overwrite needed userinfo to avoid successful login when using email 2fa

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann 2024-08-30 16:26:55 +02:00
parent 4ea7e10304
commit 05ca08c5c3
No known key found for this signature in database
GPG Key ID: C121F97338D7A352

View File

@ -111,7 +111,7 @@ if ($action == '2fa_entercode') {
// when using email-2fa, remove the one-time-code // when using email-2fa, remove the one-time-code
if ($userinfo['type_2fa'] == '1') { if ($userinfo['type_2fa'] == '1') {
$del_stmt = Database::prepare("UPDATE " . $table . " SET `data_2fa` = '' WHERE `" . $field . "` = :uid"); $del_stmt = Database::prepare("UPDATE " . $table . " SET `data_2fa` = '' WHERE `" . $field . "` = :uid");
$userinfo = Database::pexecute_first($del_stmt, [ Database::pexecute_first($del_stmt, [
'uid' => $uid 'uid' => $uid
]); ]);
} }