diff options
Diffstat (limited to 'includes/pages/admin_user.php')
-rw-r--r-- | includes/pages/admin_user.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index ca814b2e..9b3b0f44 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -119,20 +119,20 @@ function admin_user() $html .= '<hr />'; - $my_highest_group = DB::select( + $my_highest_group = DB::selectOne( 'SELECT group_id FROM `UserGroups` WHERE `uid`=? ORDER BY `group_id` LIMIT 1', [$user['UID']] ); - if (count($my_highest_group) > 0) { - $my_highest_group = $my_highest_group[0]['group_id']; + if (!empty($my_highest_group)) { + $my_highest_group = $my_highest_group['group_id']; } - $his_highest_group = DB::select( + $his_highest_group = DB::selectOne( 'SELECT `group_id` FROM `UserGroups` WHERE `uid`=? ORDER BY `group_id` LIMIT 1', [$user_id] ); - if (count($his_highest_group) > 0) { - $his_highest_group = $his_highest_group[0]['group_id']; + if (!empty($his_highest_group)) { + $his_highest_group = $his_highest_group['group_id']; } if ($user_id != $user['UID'] && $my_highest_group <= $his_highest_group) { @@ -192,7 +192,7 @@ function admin_user() count($my_highest_group) > 0 && ( count($his_highest_group) == 0 - || ($my_highest_group[0]['group_id'] <= $his_highest_group[0]['group_id']) + || ($my_highest_group['group_id'] <= $his_highest_group['group_id']) ) ) { $groups_source = DB::select(' @@ -207,7 +207,7 @@ function admin_user() ', [ $user_id, - $my_highest_group[0]['group_id'], + $my_highest_group['group_id'], ] ); $groups = []; |