mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Fix user settings
Load new settings after login
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
//if session created is not set then set the time
|
||||
if (!isset($_SESSION['session']['created'])) {
|
||||
$_SESSION['session']['created'] = time();
|
||||
}
|
||||
}
|
||||
|
||||
//check the elapsed time if exceeds limit then rotate the session
|
||||
if (time() - $_SESSION['session']['created'] > 900) {
|
||||
@@ -114,11 +114,8 @@
|
||||
//if the session is not authorized then verify the identity
|
||||
if (!$_SESSION['authorized']) {
|
||||
|
||||
//clear the menu
|
||||
unset($_SESSION["menu"]);
|
||||
|
||||
//clear the template only if the template has not been assigned by the superadmin
|
||||
if (empty($_SESSION['domain']['template']['name'])) {
|
||||
if (empty($settings->get('domain', 'template'))) {
|
||||
$_SESSION["template_content"] = '';
|
||||
}
|
||||
|
||||
@@ -140,12 +137,16 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
//clear the menu
|
||||
unset($_SESSION["menu"]);
|
||||
|
||||
//get settings based on the user
|
||||
$settings = new settings(['database' => $database, 'domain_uuid' => $_SESSION['domain_uuid'], 'user_uuid' => $_SESSION['user_uuid']]);
|
||||
settings::clear_cache();
|
||||
|
||||
//if logged in, redirect to login destination
|
||||
if (!isset($_REQUEST["key"])) {
|
||||
|
||||
//create database object
|
||||
$database = database::new();
|
||||
|
||||
//connect to the settings object
|
||||
$settings = new settings(['database' => $database, 'domain_uuid' => $domain_uuid, 'user_uuid' => $user_uuid]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user