Fix broken portal login and password reset due to the timezone set before the session was initiated, now we set the timezone after session has started

This commit is contained in:
johnnyq
2024-11-06 17:55:46 -05:00
parent 6dbf6f0778
commit af9ec9ca85
3 changed files with 9 additions and 13 deletions

View File

@@ -5,13 +5,8 @@
*/
require_once '../config.php';
// Set Timezone
require_once "../inc_set_timezone.php";
require_once '../functions.php';
if (!isset($_SESSION)) {
// HTTP Only cookies
ini_set("session.cookie_httponly", true);
@@ -22,6 +17,9 @@ if (!isset($_SESSION)) {
session_start();
}
// Set Timezone after session starts
require_once "../inc_set_timezone.php";
$sql_settings = mysqli_query($mysqli, "SELECT config_azure_client_id, config_azure_client_secret FROM settings WHERE company_id = 1");
$settings = mysqli_fetch_array($sql_settings);