#8889 Fixed url location

This commit is contained in:
Daniel Maya 2022-07-14 16:50:26 +02:00
parent 66a69aa548
commit 0ff688f6fa
1 changed files with 12 additions and 4 deletions

View File

@ -193,15 +193,23 @@ switch ($action) {
if ($user->isWaitingDoubleAuth()) {
if ($user->validateDoubleAuthCode()) {
// Logged. Refresh the page
header('Location: .');
$url = ui_get_full_url('');
$url = str_replace("\n", '', $url);
$url = str_replace('?action=logout', '', $url);
// Logged. Refresh the page.
header('Location: '.$url);
return;
} else {
$user->showDoubleAuthPage();
}
} else {
// Logged. Refresh the page
header('Location: .');
$url = ui_get_full_url('');
$url = str_replace("\n", '', $url);
$url = str_replace('?action=logout', '', $url);
// Logged. Refresh the page.
header('Location: '.$url);
return;
}
} else {