diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index d7a546a96a..42a70cf5e2 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -374,6 +374,11 @@ $sub["operation/users/user_edit"]["text"] = __('Edit my user'); $sub["operation/users/user_edit"]["id"] = 'Edit my user'; $sub["operation/users/user_edit"]["refr"] = 0; +// Users +$sub["operation/users/user_edit_notifications"]["text"] = __('Configure user notifications'); +$sub["operation/users/user_edit_notifications"]["id"] = 'Configure user notifications'; +$sub["operation/users/user_edit_notifications"]["refr"] = 0; + // ANY user can chat with other user and dogs. // Users $sub["operation/users/webchat"]["text"] = __('WebChat'); diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index 1c2eb0ef2e..7613caa92e 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -13,56 +13,11 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. - // Load global vars global $config; -check_login (); - -enterprise_hook('open_meta_frame'); - -include_once($config['homedir'] . "/include/functions_profile.php"); -include_once($config['homedir'] . '/include/functions_users.php'); -include_once ($config['homedir'] . '/include/functions_groups.php'); -include_once ($config['homedir'] . '/include/functions_visual_map.php'); - -$meta = false; -if (enterprise_installed() && defined("METACONSOLE")) { - $meta = true; -} - -$id = get_parameter_get ("id", $config["id_user"]); // ID given as parameter -$status = get_parameter ("status", -1); // Flag to print action status message - -$user_info = get_user_info ($id); -$id = $user_info["id_user"]; //This is done in case there are problems with uppercase/lowercase (MySQL auth has that problem) - -if ((!check_acl ($config["id_user"], users_get_groups ($id), "UM")) - AND ($id != $config["id_user"])) { - - db_pandora_audit("ACL Violation","Trying to view a user without privileges"); - require ("general/noaccess.php"); - exit; -} - -//If current user is editing himself or if the user has UM (User Management) rights on any groups the user is part of AND the authorization scheme allows for users/admins to update info -if (($config["id_user"] == $id || check_acl ($config["id_user"], users_get_groups ($id), "UM")) && $config["user_can_update_info"]) { - $view_mode = false; -} -else { - $view_mode = true; -} - -// Header -if ($meta) { - user_meta_print_header(); - $url = 'index.php?sec=advanced&sec2=advanced/users_setup&tab=user_edit'; -} -else { - ui_print_page_header (__('User detail editor'), "images/op_workspace.png", false, "", false, ""); - $url = 'index.php?sec=workspace&sec2=operation/users/user_edit'; -} - +// Load the header +require($config['homedir'] . "/operation/users/user_edit_header.php"); // Update user info if (isset ($_GET["modified"]) && !$view_mode) { @@ -525,7 +480,7 @@ $table->rowclass[] = ''; $table->rowstyle[] = ''; $table->data[] = $data; -echo '
'; +echo ''; html_print_table($table); diff --git a/pandora_console/operation/users/user_edit_header.php b/pandora_console/operation/users/user_edit_header.php new file mode 100644 index 0000000000..99e0567e57 --- /dev/null +++ b/pandora_console/operation/users/user_edit_header.php @@ -0,0 +1,97 @@ + array( + 'active' => $_GET['sec2'] === 'operation/users/user_edit', + 'text' => + "". + html_print_image ( + "images/user_green.png", + true, + array ("title" => __('User management')) + ).'' + ), + 'notifications' => array( + 'active' => $_GET['sec2'] === 'operation/users/user_edit_notifications', + 'text' => + "". + html_print_image ( + "images/alerts_template.png", + true, + array ("title" => __('User notifications')) + ).'' + ) + ); + + ui_print_page_header ( + __('User detail editor'), + "images/op_workspace.png", + false, + "", + false, + $buttons + ); +} + +?> \ No newline at end of file diff --git a/pandora_console/operation/users/user_edit_notifications.php b/pandora_console/operation/users/user_edit_notifications.php new file mode 100644 index 0000000000..edec0e2a6c --- /dev/null +++ b/pandora_console/operation/users/user_edit_notifications.php @@ -0,0 +1,24 @@ + \ No newline at end of file