mirror of https://github.com/itflow-org/itflow
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:
parent
6dbf6f0778
commit
af9ec9ca85
|
|
@ -8,9 +8,6 @@ header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.g
|
|||
|
||||
require_once '../config.php';
|
||||
|
||||
// Set Timezone
|
||||
require_once "../inc_set_timezone.php";
|
||||
|
||||
require_once '../functions.php';
|
||||
|
||||
require_once '../get_settings.php';
|
||||
|
|
@ -25,6 +22,9 @@ if (!isset($_SESSION)) {
|
|||
session_start();
|
||||
}
|
||||
|
||||
// Set Timezone after session_start
|
||||
require_once "../inc_set_timezone.php";
|
||||
|
||||
// Check to see if client portal is enabled
|
||||
if($config_client_portal_enable == 0) {
|
||||
echo "Client Portal is Disabled";
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,7 @@
|
|||
header("Content-Security-Policy: default-src 'self' fonts.googleapis.com fonts.gstatic.com");
|
||||
|
||||
require_once '../config.php';
|
||||
|
||||
// Set Timezone
|
||||
require_once "../inc_set_timezone.php";
|
||||
|
||||
require_once '../functions.php';
|
||||
|
||||
require_once '../get_settings.php';
|
||||
|
||||
|
||||
|
|
@ -37,6 +32,9 @@ if (!isset($_SESSION)) {
|
|||
session_start();
|
||||
}
|
||||
|
||||
// Set Timezone after session
|
||||
require_once "../inc_set_timezone.php";
|
||||
|
||||
$ip = sanitizeInput(getIP());
|
||||
$user_agent = sanitizeInput($_SERVER['HTTP_USER_AGENT']);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue