Do not show disabled or users that were before the trip creation date

This commit is contained in:
johnnyq
2023-11-07 16:34:32 -05:00
parent afc040bfe6
commit 5d1c283533
3 changed files with 8 additions and 5 deletions

View File

@@ -74,7 +74,10 @@
<?php
// WIP Need to only show users within the session company
$sql_trips = mysqli_query($mysqli, "SELECT * FROM users ORDER BY user_name ASC");
$sql_trips = mysqli_query($mysqli, "SELECT users.user_id, user_name FROM users
LEFT JOIN user_settings on users.user_id = user_settings.user_id
WHERE user_role > 1 AND user_archived_at IS NULL ORDER BY user_name ASC"
);
while ($row = mysqli_fetch_array($sql_trips)) {
$user_id_select = intval($row['user_id']);
$user_name_select = nullable_htmlentities($row['user_name']);