Login: Resolve double prompt for authentication code.
This commit is contained in:
parent
67e60db16a
commit
d17265c3ec
|
|
@ -63,7 +63,7 @@
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//login prompt
|
//login prompt
|
||||||
require_once "resources/check_auth.php";
|
header("Location: ".PROJECT_PATH."/login.php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
27
login.php
27
login.php
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
|
|
@ -26,25 +26,10 @@
|
||||||
//includes files
|
//includes files
|
||||||
require_once __DIR__ . "/resources/require.php";
|
require_once __DIR__ . "/resources/require.php";
|
||||||
|
|
||||||
//start session
|
//additional includes
|
||||||
if (!isset($_SESSION)) { session_start(); }
|
require_once "resources/check_auth.php";
|
||||||
|
|
||||||
//if config.conf file does not exist then redirect to the install page
|
//redirect
|
||||||
if (file_exists("/usr/local/etc/fusionpbx/config.conf")) {
|
header("Location: ".PROJECT_PATH."/core/dashboard/");
|
||||||
//BSD
|
|
||||||
} elseif (file_exists("/etc/fusionpbx/config.conf")) {
|
|
||||||
//Linux
|
|
||||||
} else {
|
|
||||||
header("Location: /core/install/install.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
//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";
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
Loading…
Reference in New Issue