Only redirect when not using the key.

This commit is contained in:
FusionPBX 2021-08-04 22:38:48 -06:00 committed by GitHub
parent e5df624536
commit b24c55f149
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 8 deletions

View File

@ -296,15 +296,18 @@
}
//if logged in, redirect to login destination
if (isset($_SESSION['login']['destination']['url'])) {
header("Location: ".$_SESSION['login']['destination']['url']);
} elseif (file_exists($_SERVER["PROJECT_ROOT"]."/core/user_settings/user_dashboard.php")) {
header("Location: ".PROJECT_PATH."/core/user_settings/user_dashboard.php");
}
else {
require_once "resources/header.php";
require_once "resources/footer.php";
if (!isset($_REQUEST["key"])) {
if (isset($_SESSION['login']['destination']['url'])) {
header("Location: ".$_SESSION['login']['destination']['url']);
} elseif (file_exists($_SERVER["PROJECT_ROOT"]."/core/user_settings/user_dashboard.php")) {
header("Location: ".PROJECT_PATH."/core/user_settings/user_dashboard.php");
}
else {
require_once "resources/header.php";
require_once "resources/footer.php";
}
}
}
//set the time zone