diff options
Diffstat (limited to 'includes/pages/admin_user.php')
-rw-r--r-- | includes/pages/admin_user.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index 781d0f6a..f13550ed 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -179,8 +179,8 @@ function admin_user() { switch ($_REQUEST['action']) { case 'save_groups' : if ($id != $user['UID']) { - list ($my_highest_group) = sql_select("SELECT * FROM `UserGroups` WHERE `uid`=" . sql_escape($user['UID']) . " ORDER BY `uid`"); - list ($his_highest_group) = sql_select("SELECT * FROM `UserGroups` WHERE `uid`=" . sql_escape($id) . " ORDER BY `uid`"); + list ($my_highest_group) = sql_select("SELECT * FROM `UserGroups` WHERE `uid`=" . sql_escape($user['UID']) . " ORDER BY `group_id`"); + list ($his_highest_group) = sql_select("SELECT * FROM `UserGroups` WHERE `uid`=" . sql_escape($id) . " ORDER BY `group_id`"); if ($my_highest_group <= $his_highest_group) { $groups = sql_select("SELECT * FROM `Groups` LEFT OUTER JOIN `UserGroups` ON (`UserGroups`.`group_id` = `Groups`.`UID` AND `UserGroups`.`uid` = " . sql_escape($id) . ") WHERE `Groups`.`UID` >= " . sql_escape($my_highest_group['group_id']) . " ORDER BY `Groups`.`Name`"); |