From 2e110fb1623dfb398078325370741b30076f862a Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Wed, 28 Jun 2023 15:08:09 +0200 Subject: [PATCH] #11670 Fix home page --- pandora_console/godmode/users/configure_user.php | 6 ++---- pandora_console/godmode/users/user_management.php | 2 +- pandora_console/include/auth/mysql.php | 4 ---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 047d0b0925..015a2e3c60 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -353,8 +353,7 @@ if ($create_user === true) { $values['data_section'] = get_parameter('data_section'); } - $values['section'] = $homeScreenValues[$values['section']]; - + // $values['section'] = $homeScreenValues[$values['section']]; if (enterprise_installed() === true) { $values['force_change_pass'] = 1; $values['last_pass_change'] = date('Y/m/d H:i:s', get_system_time()); @@ -645,8 +644,7 @@ if ($update_user) { $values['data_section'] = get_parameter('data_section'); } - $values['section'] = $homeScreenValues[$values['section']]; - + // $values['section'] = $homeScreenValues[$values['section']]; if (enterprise_installed() === true && is_metaconsole() === true) { if (users_is_admin() === true) { $values['metaconsole_access'] = get_parameter('metaconsole_access'); diff --git a/pandora_console/godmode/users/user_management.php b/pandora_console/godmode/users/user_management.php index 7fc3bf23e3..a09d48912f 100644 --- a/pandora_console/godmode/users/user_management.php +++ b/pandora_console/godmode/users/user_management.php @@ -633,7 +633,7 @@ $homeScreenTable->rowclass['fields_homescreen'] = 'field_half_width flex'; $homeScreenTable->data['fields_homescreen'][0] = html_print_select( $homeScreenValues, 'section', - array_search($user_info['section'], $homeScreenValues), + $user_info['section'], 'show_data_section();', '', -1, diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index 614dba20b1..dea8cfdba2 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -814,10 +814,6 @@ function update_user(string $id_user, array $values) HOME_SCREEN_DASHBOARD => __('Dashboard'), ]; - if (array_key_exists($values['section'], $homeScreenValues) === true) { - $values['section'] = $homeScreenValues[$values['section']]; - } - if (is_metaconsole() === true) { $values['metaconsole_section'] = $values['section']; $values['metaconsole_data_section'] = $values['data_section'];