Fix the user settings

- When language is changed, update the menu and translations immediately
- When time zone is changed, update it immediately
- Flush the settings apcu cache if enabled
This commit is contained in:
FusionPBX
2025-10-10 12:01:51 -06:00
committed by GitHub
parent ec852b10f8
commit 435ef38c88
16 changed files with 124 additions and 74 deletions

View File

@@ -570,6 +570,13 @@
$p->delete("user_edit", "temp");
$p->delete('user_group_add', 'temp');
//clear the menu
unset($_SESSION["menu"]);
//get settings based on the user
$settings = new settings(['database' => $database, 'domain_uuid' => $domain_uuid, 'user_uuid' => $user_uuid]);
settings::clear_cache();
//if call center installed
if ($action == 'edit' && permission_exists('user_edit') && file_exists($_SERVER["PROJECT_ROOT"]."/app/call_centers/app_config.php")) {
//get the call center agent uuid

View File

@@ -438,6 +438,13 @@
$p->delete("contact_attachment_edit", "temp");
$p->delete("contact_attachment_delete", "temp");
//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 call center installed
if ($action == 'edit' && permission_exists('user_edit') && file_exists($_SERVER["PROJECT_ROOT"]."/app/call_centers/app_config.php")) {
//get the call center agent uuid