From 99ecc2d4a42390d6eb04b303334f4f8d893bf295 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Thu, 15 Oct 2026 21:29:40 -0400 Subject: [PATCH] Modernize Administration > Users and the agent Account pages: new users list with Users/Admins/No MFA/Disabled/Archived views, role filter, status and MFA pills, remembered browsers, client access summary, last successful sign in with device and IP, seat badge, quick look modal, bulk role/require MFA/forget browsers/activate/disable, shared New/Edit user form with Details/Sign in/Client access tabs (icon prefixed inputs, picture preview, generated passwords, Only/Never client rules with search and set all), archive modal with ticket hand-over, restore requiring a new password, incident response limited to agents and forgetting remembered browsers, export role filter and MFA/last sign in/client access columns; Account pages reworked into Profile/Security/Preferences/Activity with current password required to change email, password or turn MFA off, inline SVG MFA QR code, remembered browser list with forget one/all, rows per page preference; adds functions/user.php shared helpers, validates email format and uniqueness, sets password hash and vault key from the exact typed password, purifies signatures, fixes Activity showing other agents' sign ins, removes dead user invite modal and user_model, and fixes the networks export link from All Clients with no filter --- admin/modals/user/user.php | 116 ++++ admin/modals/user/user_add.php | 174 +---- admin/modals/user/user_all_reset_password.php | 57 +- admin/modals/user/user_archive.php | 109 +-- admin/modals/user/user_bulk_role.php | 45 ++ admin/modals/user/user_edit.php | 239 +------ admin/modals/user/user_export.php | 39 +- admin/modals/user/user_form.php | 377 +++++++++++ admin/modals/user/user_invite.php | 43 -- admin/modals/user/user_restore.php | 104 +-- admin/post/user_model.php | 8 - admin/post/users.php | 639 ++++++++++-------- admin/users.php | 526 ++++++++------ agent/networks.php | 2 +- agent/user/includes/mfa_setup.php | 38 ++ agent/user/includes/user_side_nav.php | 66 +- agent/user/mfa_enforcement.php | 29 +- agent/user/modals/user_mfa_modal.php | 38 +- agent/user/post/profile.php | 328 ++++----- agent/user/user_activity.php | 158 +++-- agent/user/user_details.php | 184 +++-- agent/user/user_preferences.php | 85 ++- agent/user/user_security.php | 246 +++++-- css/itflow_custom.css | 95 +++ functions.php | 1 + functions/export.php | 3 + functions/user.php | 509 ++++++++++++++ includes/top_nav.php | 18 +- 28 files changed, 2703 insertions(+), 1573 deletions(-) create mode 100644 admin/modals/user/user.php create mode 100644 admin/modals/user/user_bulk_role.php create mode 100644 admin/modals/user/user_form.php delete mode 100644 admin/modals/user/user_invite.php delete mode 100644 admin/post/user_model.php create mode 100644 agent/user/includes/mfa_setup.php create mode 100644 functions/user.php diff --git a/admin/modals/user/user.php b/admin/modals/user/user.php new file mode 100644 index 000000000..8b36af996 --- /dev/null +++ b/admin/modals/user/user.php @@ -0,0 +1,116 @@ + Users. Who they are, whether and + * how they sign in, the clients they see, the work they have open, and their + * latest sign ins. + */ + +require_once '../../includes/modal_header.php'; + +$user = userForModal($_GET['id'] ?? 0); +$user_id = intval($user['user_id']); +$is_self = $user_id === intval($session_user_id); +$is_archived = !empty($user['user_archived_at']); +$is_admin = intval($user['role_is_admin']) === 1; +$display_name = $is_archived ? trim(str_replace(' (archived)', '', $user['user_name'])) : $user['user_name']; +$access = userClientAccess([$user_id])[$user_id]; +$remembered = userRememberCounts([$user_id])[$user_id]; +[$open_tickets, $recurring_tickets] = userOpenWork($user_id); +$recent = userRecentLogins($user_id, 6); + +ob_start(); + +?> + + + + + + + isset(userRoles()[$role_id]) ? $role_id : 0, + 'user_config_force_mfa' => 0, +]; + ob_start(); ?> @@ -11,148 +23,12 @@ ob_start();
+
- - " . intval($session_user_id)))[0]); + ob_start(); ?> -