diff --git a/index.php b/index.php index 6a4c0a06a8..2427cea33b 100644 --- a/index.php +++ b/index.php @@ -63,7 +63,7 @@ } else { //login prompt - require_once "resources/check_auth.php"; + header("Location: ".PROJECT_PATH."/login.php"); } } diff --git a/login.php b/login.php index a169e6d144..7e8c654017 100644 --- a/login.php +++ b/login.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2022 + Portions created by the Initial Developer are Copyright (C) 2008-2023 the Initial Developer. All Rights Reserved. Contributor(s): @@ -26,25 +26,10 @@ //includes files require_once __DIR__ . "/resources/require.php"; -//start session - if (!isset($_SESSION)) { session_start(); } +//additional includes + require_once "resources/check_auth.php"; -//if config.conf file does not exist then redirect to the install page - if (file_exists("/usr/local/etc/fusionpbx/config.conf")) { - //BSD - } elseif (file_exists("/etc/fusionpbx/config.conf")) { - //Linux - } else { - header("Location: /core/install/install.php"); - exit; - } +//redirect + header("Location: ".PROJECT_PATH."/core/dashboard/"); -//use custom login, if present, otherwise use default login - if (file_exists($_SERVER["PROJECT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/login.php")) { - require_once "themes/".$_SESSION['domain']['template']['name']."/login.php"; - } - else { - require_once "resources/login.php"; - } - -?> +?> \ No newline at end of file