Redirect sitll needed here for clicking on the logo.

This commit is contained in:
FusionPBX 2021-08-01 17:13:59 -06:00 committed by GitHub
parent e2128166c3
commit 2ed2fe32b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions

View File

@ -58,7 +58,18 @@
require_once "resources/require.php";
//if logged in, redirect to login destination
if (!isset($_SESSION["username"])) {
if (isset($_SESSION["username"])) {
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";
}
}
else {
//use custom index, if present, otherwise use custom login, if present, otherwise use default login
if (file_exists($_SERVER["PROJECT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/index.php")) {
require_once "themes/".$_SESSION['domain']['template']['name']."/index.php";