Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
44b70d7
Add database field for ticket_first_response_at. This can be used as …
Mar 7, 2025
e5dc50e
Add time by technician report
Mar 7, 2025
bf9c2f6
Merge pull request #1182 from itflow-org/tck-fr-at
johnnyq Mar 9, 2025
89e59b2
Merge pull request #1184 from itflow-org/tck-time-by-tech
johnnyq Mar 9, 2025
244a47e
Added Recurring Invoice Reference ID to Invoices and Product ID refer…
johnnyq Mar 10, 2025
3804e18
When cron or manually generating invoice from a Recurring Invoice ins…
johnnyq Mar 10, 2025
9b6ea85
Removed the prepended user_ from the fields in the user_roles table, …
johnnyq Mar 10, 2025
164a6a5
Started Standard user view and client user view in users
johnnyq Mar 10, 2025
82c7a64
Added Bulk Delete Asset Functionality and also deleted more asset ref…
johnnyq Mar 10, 2025
07c8398
Update user_roles naming in setup and setup_cli
johnnyq Mar 10, 2025
3f0a6df
Organize color theme settings into similar color rows
johnnyq Mar 10, 2025
28c8b1a
Fix missing attachments on ticket replies via the ticket email parser
johnnyq Mar 10, 2025
4921d1e
More Work on Client Users section, added User Icon Indicator in conta…
johnnyq Mar 11, 2025
f61c30b
Started work on additional assets per ticket, added table ticket_asse…
johnnyq Mar 11, 2025
a0a2fdd
Feature: Additonal Assets can now be assigned to a single Ticket
johnnyq Mar 11, 2025
daab1bc
Rename the remain items from Scheduled Tickets to Recurring Tickets
johnnyq Mar 11, 2025
d0b8095
Feature: Added additional assets to Recurring Tickets as well
johnnyq Mar 11, 2025
a059899
Update Recurring Tickets in a few more places
johnnyq Mar 11, 2025
619b93a
Renamed Recurring to recurring_invoices updated a large portion of co…
johnnyq Mar 12, 2025
4efb393
Missed recurring_invoice details and fixes up a few other places for …
johnnyq Mar 12, 2025
87c1a95
Few more places for recurring invoice vars
johnnyq Mar 12, 2025
c7f4e48
A Few more places to update recurring invoice vars
johnnyq Mar 12, 2025
2533f0c
Fix Create Auto Payment after renaming recurring to recurring invoices
johnnyq Mar 12, 2025
b78e31e
Fix Recurring Income by Client Report with the updated recurring invo…
johnnyq Mar 12, 2025
c0db914
Added Recurring Ticket Reference to Tickets
johnnyq Mar 12, 2025
e93704b
Completely renamed everything login to credential including tables ad…
johnnyq Mar 13, 2025
c1c5478
Update client export pdf for new table field names
johnnyq Mar 13, 2025
15aed89
Fix credential vars in Services
johnnyq Mar 13, 2025
338a08d
Fix credential vars in Services post
johnnyq Mar 13, 2025
c8c1155
Update the API for the new cred var names
johnnyq Mar 13, 2025
f1783a6
update credential model
johnnyq Mar 13, 2025
f64641c
Fix regression OTP in guest view item
johnnyq Mar 13, 2025
59bbbe4
Removed Patch panel tables as they share similarities with assets and…
johnnyq Mar 13, 2025
7150b15
Moved files check_login.php, get_settings.php, settings_localization_…
johnnyq Mar 13, 2025
f1aa661
Update pointers to the includes folder
johnnyq Mar 13, 2025
509fb5c
Bump TinyMCE from 7.6.1 to 7.7.1
johnnyq Mar 13, 2025
06c31e0
Update Asset reference SQL Tables to use Foreign keys and cascading d…
johnnyq Mar 14, 2025
eabfef2
Turned caching back on for Ajax Modals Function Fix some PHP Error, u…
johnnyq Mar 14, 2025
8fb8ce3
Added copy to clipboard for contact and asset ajax modal credentials …
johnnyq Mar 14, 2025
bf327af
Bump DataTables from 2.2.1 to 2.2.2
johnnyq Mar 14, 2025
073f816
Do not allow cascade deletion for rack devices as this table is optio…
johnnyq Mar 14, 2025
508af6a
Fix some Database update logic
johnnyq Mar 14, 2025
09fbe4e
Update more multi to multi link tables to use cascading delete and fo…
johnnyq Mar 14, 2025
97f92e5
Remove Associated Deletions as these are handled by the database casc…
johnnyq Mar 14, 2025
cc0b212
Removed most Associated deletions when deleting a client as most of t…
johnnyq Mar 14, 2025
5a64bd3
Ensure all Tables and fields use CHARACTER SET utf8mb4 COLLATE utf8mb…
johnnyq Mar 15, 2025
244e129
Convert service_domains to use InnoDB instead of MyISAM
johnnyq Mar 15, 2025
4378fc2
Removed redundant hash field from files table as the reference alread…
johnnyq Mar 17, 2025
b803ba4
Use MD5 hashing instead of SHA256 on file uploads which is way faster…
johnnyq Mar 17, 2025
6a8d2cf
Add ticket redaction feature
Mar 18, 2025
21dc26b
Merge branch 'develop' into ticket-redaction
wrongecho Mar 18, 2025
ec8d7a3
Only store optimized WebP images, so only 1 image is stored and used …
johnnyq Mar 18, 2025
aae633c
Merge pull request #1189 from itflow-org/ticket-redaction
wrongecho Mar 19, 2025
a1ea521
Sonarcloud fixes
Mar 19, 2025
400ba5b
Started changelog
Mar 19, 2025
37c20e4
Hyperlink the report_time_by_tech report. Need to add a monthly version.
Mar 19, 2025
c3ec83f
Updated changelog also added redact to open tickets
johnnyq Mar 19, 2025
06de349
Expanded the Redact tool into ticket details area, generalized it to …
johnnyq Mar 19, 2025
e69d697
Cron - Only notify on certificates expiring in 45 days if they are va…
Mar 20, 2025
19a6f8f
Use nearest text area instead of a static ID for AI rewording, starte…
johnnyq Mar 20, 2025
475d653
You can now upload and create documents, credentials in contact and …
johnnyq Mar 20, 2025
622d5e5
Delete unused add asset ajax modal
johnnyq Mar 20, 2025
eedd92c
Fix creating a ticket and selecting a template it would use template …
johnnyq Mar 20, 2025
62b8ee9
Merge pull request #1190 from itflow-org/cron-certificate-notifs
johnnyq Mar 20, 2025
ad3ed68
Add the ability to Create a ticket inside a project then auto assign …
johnnyq Mar 20, 2025
cf04702
Add Projects to client side nav and seperated the logic between clien…
johnnyq Mar 20, 2025
d3c4c8c
Comment Query
johnnyq Mar 20, 2025
f72351e
UI tidy
johnnyq Mar 21, 2025
93f4da3
Added Phone Country Code fields defaulting to +1 for US will add logi…
johnnyq Mar 21, 2025
0647933
Added JS Library to handle Country based Phone formatting inputs intl…
johnnyq Mar 21, 2025
8e3dd42
Allow start interface to be named 0
johnnyq Mar 22, 2025
0b9f109
Add Client Select Filters the remaining entities also when creating a…
johnnyq Mar 22, 2025
5739537
Limit Client Selection to clients that have an emtity in client filters
johnnyq Mar 22, 2025
34e92d2
Update Tags filter to only show tags available
johnnyq Mar 22, 2025
5043462
Only show locations if an entity references the locations. Previously…
johnnyq Mar 22, 2025
19b2b08
Update locations filter to still include the a location that is not a…
johnnyq Mar 22, 2025
c2adb92
Rework tag filter a bit to use array_map instead of looping through t…
johnnyq Mar 22, 2025
61aa477
Fix Tags
johnnyq Mar 23, 2025
53713a0
Add back batch payment when in client view for invoices
johnnyq Mar 23, 2025
df8a755
Wrap a wait before the DOM is loaded before loading anything calling …
johnnyq Mar 23, 2025
85ae421
Feature: Added User Signature preferences, currently appends signatur…
johnnyq Mar 24, 2025
4c85db5
Remove legacy redact function in favor of tinymce integration redact
johnnyq Mar 24, 2025
218fd2d
Update formatPhoneNumber php function to include other country format…
johnnyq Mar 25, 2025
6a26b61
Remove Phone Masking option in favor of Country Codes
johnnyq Mar 26, 2025
3286343
Update DB to remove phone_mask
johnnyq Mar 26, 2025
07b29a7
Add Phone Country code in more places for proper phone number formatting
johnnyq Mar 26, 2025
5b89e3d
Add Phone Country code in even more places
johnnyq Mar 26, 2025
bbb0db2
Update Changelog
johnnyq Mar 26, 2025
b5fa8ab
Added Search by client Abbreviation to client and global search
johnnyq Mar 26, 2025
382258a
Add User and Asset Assigned Licenses to Client PDF Export
johnnyq Mar 26, 2025
12fd45c
Dont include Archived Assets, contacts or software is the software li…
johnnyq Mar 26, 2025
90f5c8a
Simplify getFallBack function to just fallback on - instead N/A
johnnyq Mar 26, 2025
634afcc
Added TCPDF for PDFs and allow document export to PDF
johnnyq Mar 26, 2025
63b8804
Migrated client pdf export to TCPDF from pdfMake
johnnyq Mar 27, 2025
ae1a0dc
Certificates page and sidebar - Only show yellow on certificates 7 da…
Mar 27, 2025
421abd4
Tickets api - bugfix 500 error
Mar 27, 2025
eadfdc4
Tickets api - allow setting the billable status when creating a ticket
Mar 27, 2025
1a8a378
Merge pull request #1192 from itflow-org/certs-exp-colours
johnnyq Mar 27, 2025
8a01bc0
Recurring ticket - remove rogue 's' from 'Contact' tab
Mar 27, 2025
65eaf92
Fixed a few debug errors where client was not checked to see if it wa…
johnnyq Mar 27, 2025
7d47ed4
Merge branch 'develop' of github.com:itflow-org/itflow into develop
johnnyq Mar 27, 2025
b7df21a
Notify if a recurring ticket, invoice or expense has a next run date …
Mar 27, 2025
9223b8c
Fixed some renamed vars
johnnyq Mar 27, 2025
810af63
Merge pull request #1193 from itflow-org/cron-recurring-notify
johnnyq Mar 27, 2025
2fb75e6
Uncommented out temp comment check cli runtime
johnnyq Mar 27, 2025
231694a
Fix Invoice Vars in ticket, return empty string instead of null for g…
johnnyq Mar 27, 2025
4bb37a7
Removed absent task_description var from projects
johnnyq Mar 27, 2025
c2bba7a
Allow to close a project with resolved tickets
johnnyq Mar 27, 2025
9f7c289
Fix AI Promps
johnnyq Mar 28, 2025
cf3f0ce
Revert Users listing
johnnyq Mar 28, 2025
eaeadbe
Fix users list
johnnyq Mar 28, 2025
7d78544
Refined and updated changelog
johnnyq Mar 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,57 @@

This file documents all notable changes made to ITFlow.

## [25.03 UNRELEASED]

### Fixed
- Resolved missing attachments in ticket replies processed via the email parser.
- Fixed issue where the top half of portrait image uploads appeared cut off at the bottom.
- Ensured all tables and fields use `CHARACTER SET utf8mb4` and `COLLATE utf8mb4_general_ci` for updates and new installations.
- Converted `service_domains` table to use InnoDB instead of MyISAM.
- Fixed the initials function to properly handle UTF-8 characters, preventing contact-related issues.
- Interfaces can now start with `0`.
- Adjusted AI prompt handling to focus solely on content, avoiding unnecessary additions.

### Added / Changed
- Introduced bulk delete functionality for assets.
- Added the ability to redact ticket replies after a ticket is closed.
- Added support for redacting specific text while a ticket is open.
- Switched file upload hashing from SHA256 to MD5 to significantly improve performance.
- Enabled assigning multiple assets to a single ticket.
- Updated all many-to-many tables to support cascading deletes using foreign key associations, improving efficiency, performance, and data integrity.
- Enabled caching for AJAX modals to reduce repeated reloads and enhance browser performance.
- Upgraded DataTables from 2.2.1 to 2.2.2.
- Upgraded TinyMCE from 7.6.1 to 7.7.1, providing a significant performance boost.
- Added “Copy Credentials to Clipboard” button in AJAX asset and contact views.
- Renamed and reorganized several tables.
- Improved theme color organization by grouping primary colors and their related shades.
- Displayed a user icon next to contacts who have user accounts.
- New image uploads are now converted to optimized `.webp` format by default; original files are no longer saved. Existing images remain unchanged.
- Added international phone number support throughout the system.
- Introduced user signatures in preferences, which are now appended to all ticket replies.
- Optimized search filters to only display defined tags.
- Added “Projects” to the client-side navigation.
- Enabled “Create New Ticket” from within project details.
- Reintroduced batch payment functionality in client invoices.
- Included client abbreviations in both client and global search options.
- Added assigned software license details (User/Asset) to the client PDF export.
- Replaced client-side `pdfMake` with the PHP-based `TCPDF` library for generating client export runbooks.
- Introduced the ability to download documents as PDFs.
- Added a “Reference” field to tickets and invoices generated from recurring templates (not yet in active use).

### Breaking Changes
> **Important:** To update to this version, you **must** run the following commands from the command line from the scripts directory:
>
> ```bash
> php update_cli.php
> php update_cli.php --db_update
> ```
>
> Repeat `--db_update` until no further updates are found.
>
> **Back up your system before upgrading.**
> This version includes numerous backend changes critical for future development.

## [25.02.4]

### Fixed
Expand Down
30 changes: 15 additions & 15 deletions admin_role.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

// Default Column Sortby Filter
$sort = "user_role_is_admin";
$sort = "role_is_admin";
$order = "DESC";

require_once "includes/inc_all_admin.php";
Expand All @@ -13,8 +13,8 @@
$sql = mysqli_query(
$mysqli,
"SELECT SQL_CALC_FOUND_ROWS * FROM user_roles
WHERE (user_roles.user_role_name LIKE '%$q%' OR user_roles.user_role_description LIKE '%$q%')
AND user_roles.user_role_archived_at IS NULL
WHERE (role_name LIKE '%$q%' OR role_description LIKE '%$q%')
AND role_archived_at IS NULL
ORDER BY $sort $order LIMIT $record_from, $record_to"
);

Expand Down Expand Up @@ -53,14 +53,14 @@
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
<tr>
<th>
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=user_role_name&order=<?php echo $disp; ?>">
Role <?php if ($sort == 'user_role_name') { echo $order_icon; } ?>
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=role_name&order=<?php echo $disp; ?>">
Role <?php if ($sort == 'role_name') { echo $order_icon; } ?>
</a>
</th>
<th>Members</th>
<th>
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=user_role_is_admin&order=<?php echo $disp; ?>">
Admin <?php if ($sort == 'user_role_is_admin') { echo $order_icon; } ?>
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=role_is_admin&order=<?php echo $disp; ?>">
Admin <?php if ($sort == 'role_is_admin') { echo $order_icon; } ?>
</a>
</th>
<th class="text-center">Action</th>
Expand All @@ -70,17 +70,17 @@
<?php

while ($row = mysqli_fetch_array($sql)) {
$role_id = intval($row['user_role_id']);
$role_name = nullable_htmlentities($row['user_role_name']);
$role_description = nullable_htmlentities($row['user_role_description']);
$role_admin = intval($row['user_role_is_admin']);
$role_archived_at = nullable_htmlentities($row['user_role_archived_at']);
$role_id = intval($row['role_id']);
$role_name = nullable_htmlentities($row['role_name']);
$role_description = nullable_htmlentities($row['role_description']);
$role_admin = intval($row['role_is_admin']);
$role_archived_at = nullable_htmlentities($row['role_archived_at']);

// Count number of users that have each role
$sql_role_user_count = mysqli_query($mysqli, "SELECT COUNT(users.user_id) FROM users LEFT JOIN user_settings on users.user_id = user_settings.user_id WHERE user_role = $role_id AND user_archived_at IS NULL");
$sql_role_user_count = mysqli_query($mysqli, "SELECT COUNT(user_id) FROM users WHERE user_role_id = $role_id AND user_archived_at IS NULL");
$role_user_count = mysqli_fetch_row($sql_role_user_count)[0];

$sql_users = mysqli_query($mysqli, "SELECT * FROM users LEFT JOIN user_settings on users.user_id = user_settings.user_id WHERE user_role = $role_id AND user_archived_at IS NULL");
$sql_users = mysqli_query($mysqli, "SELECT * FROM users WHERE user_role_id = $role_id AND user_archived_at IS NULL");
// Initialize an empty array to hold user names
$user_names = [];

Expand All @@ -90,7 +90,7 @@
}

// Convert the array of user names to a comma-separated string
$user_names_string = implode(",", $user_names) ;
$user_names_string = implode(",", $user_names);

if (empty($user_names_string)) {
$user_names_string = "-";
Expand Down
21 changes: 13 additions & 8 deletions admin_settings_company.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
$company_city = nullable_htmlentities($row['company_city']);
$company_state = nullable_htmlentities($row['company_state']);
$company_zip = nullable_htmlentities($row['company_zip']);
$company_phone = formatPhoneNumber($row['company_phone']);
$company_phone_country_code = formatPhoneNumber($row['company_phone_country_code']);
$company_phone = nullable_htmlentities(formatPhoneNumber($row['company_phone'], $company_phone_country_code));
$company_email = nullable_htmlentities($row['company_email']);
$company_website = nullable_htmlentities($row['company_website']);
$company_logo = nullable_htmlentities($row['company_logo']);
Expand Down Expand Up @@ -110,13 +111,18 @@
</div>
</div>

<div class="form-group">
<label>Phone</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-phone"></i></span>
<label>Phone</label>
<div class="form-row">
<div class="col-9">
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-phone"></i></span>
</div>
<input type="tel" class="form-control col-2" name="phone_country_code" value="+<?php echo $company_phone_country_code; ?>" placeholder="Code" maxlength="4">
<input type="tel" class="form-control" name="phone" value="<?php echo $company_phone; ?>" placeholder="Phone Number" maxlength="200">
</div>
</div>
<input type="text" class="form-control" name="phone" placeholder="Phone Number" value="<?php echo $company_phone; ?>">
</div>
</div>

Expand Down Expand Up @@ -152,4 +158,3 @@

<?php
require_once "includes/footer.php";

22 changes: 0 additions & 22 deletions admin_settings_default.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,28 +218,6 @@
</div>
</div>

<div class="form-group">
<label>Phone Mask</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-phone"></i></span>
</div>
<select class="form-control select2" name="phone_mask">
<?php
$sql = mysqli_query($mysqli, "SELECT config_phone_mask FROM settings WHERE company_id = 1");
while ($row = mysqli_fetch_array($sql)) {
$phone_mask = intval($row['config_phone_mask']);
} ?>
<option <?php if ($phone_mask == 1) { echo "selected"; }?> value=1>
US Format - e.g. (412) 888-9999
</option>
<option <?php if ($phone_mask == 0) { echo "selected"; }?> value=0>
Non-US Format - e.g. 4128889999
</option>
</select>
</div>
</div>

<hr>

<button type="submit" name="edit_default_settings" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
Expand Down
4 changes: 2 additions & 2 deletions admin_settings_invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-barcode"></i></span>
</div>
<input type="text" class="form-control" name="config_recurring_prefix" placeholder="Recurring Prefix" value="<?php echo nullable_htmlentities($config_recurring_prefix); ?>" required>
<input type="text" class="form-control" name="config_recurring_invoice_prefix" placeholder="Recurring Invoice Prefix" value="<?php echo nullable_htmlentities($config_recurring_invoice_prefix); ?>" required>
</div>
</div>

Expand All @@ -87,7 +87,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-barcode"></i></span>
</div>
<input type="number" min="0" class="form-control" name="config_recurring_next_number" placeholder="Next Recurring Number" value="<?php echo intval($config_recurring_next_number); ?>" required>
<input type="number" min="0" class="form-control" name="config_recurring_invoice_next_number" placeholder="Next Recurring Invoice Number" value="<?php echo intval($config_recurring_invoice_next_number); ?>" required>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion admin_settings_theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

?>

<div class="col-3 text-center mb-3">
<div class="col-4 text-center mb-3">
<div class="form-group">
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" onchange="this.form.submit()" id="customRadio<?php echo $theme_color; ?>" name="edit_theme_settings" value="<?php echo $theme_color; ?>" <?php if ($config_theme == $theme_color) { echo "checked"; } ?>>
Expand Down
29 changes: 12 additions & 17 deletions admin_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@

require_once "includes/inc_all_admin.php";


//Rebuild URL
$url_query_strings_sort = http_build_query($get_copy);

$sql = mysqli_query(
$mysqli,
"SELECT SQL_CALC_FOUND_ROWS * FROM users, user_settings, user_roles
WHERE users.user_id = user_settings.user_id
AND user_settings.user_role = user_roles.user_role_id
AND (user_name LIKE '%$q%' OR user_email LIKE '%$q%')
"SELECT SQL_CALC_FOUND_ROWS * FROM users
LEFT JOIN user_roles ON user_role_id = role_id
LEFT JOIN user_settings ON users.user_id = user_settings.user_id
WHERE (user_name LIKE '%$q%' OR user_email LIKE '%$q%')
AND user_type = 1
AND user_archived_at IS NULL
ORDER BY $sort $order LIMIT $record_from, $record_to"
);
Expand All @@ -36,6 +33,7 @@
<div class="dropdown-menu">
<!--<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#userInviteModal"><i class="fas fa-paper-plane mr-2"></i>Invite User</a>-->
<?php if ($num_rows[0] > 1) { ?>
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportUserModal"><i class="fa fa-fw fa-download mr-2"></i>Export</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item text-danger" href="#" data-toggle="modal" data-target="#resetAllUserPassModal"><i class="fas fa-skull-crossbones mr-2"></i>IR</a>
<?php } ?>
Expand All @@ -55,9 +53,6 @@
</div>
</div>
<div class="col-md-8">
<div class="float-right">
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#exportUserModal"><i class="fa fa-fw fa-download mr-2"></i>Export</button>
</div>
</div>
</div>
</form>
Expand All @@ -77,8 +72,8 @@
</a>
</th>
<th>
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=user_role&order=<?php echo $disp; ?>">
Role <?php if ($sort == 'user_role') { echo $order_icon; } ?>
<a class="text-dark" href="?<?php echo $url_query_strings_sort; ?>&sort=role_name&order=<?php echo $disp; ?>">
Role <?php if ($sort == 'role_name') { echo $order_icon; } ?>
</a>
</th>
<th>
Expand Down Expand Up @@ -116,8 +111,8 @@
$mfa_status_display = "<i class='fas fa-fw fa-lock text-success'></i>";
}
$user_config_force_mfa = intval($row['user_config_force_mfa']);
$user_role = $row['user_role'];
$user_role_display = nullable_htmlentities($row['user_role_name']);
$user_role = intval($row['user_role_id']);
$user_role_display = nullable_htmlentities($row['role_name']);
$user_initials = nullable_htmlentities(initials($user_name));

$sql_last_login = mysqli_query(
Expand All @@ -139,7 +134,7 @@
}

// Get User Client Access Permissions
$user_client_access_sql = mysqli_query($mysqli,"SELECT client_id FROM user_permissions WHERE user_id = $user_id");
$user_client_access_sql = mysqli_query($mysqli,"SELECT client_id FROM user_client_permissions WHERE user_id = $user_id");
$client_access_array = [];
while ($row = mysqli_fetch_assoc($user_client_access_sql)) {
$client_access_array[] = intval($row['client_id']);
Expand Down Expand Up @@ -241,4 +236,4 @@ function generatePassword() {
require_once "modals/admin_user_invite_modal.php";
require_once "modals/admin_user_export_modal.php";
require_once "modals/admin_user_all_reset_password_modal.php";
require_once "includes/footer.php";
require_once "includes/footer.php";
Loading