diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index 1f19b154d7..cdfc69caba 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -3151,23 +3151,25 @@ function PMA_getHtmlForListingUsersofAGroup($userGroup) . " WHERE `usergroup`='" . $userGroup . "'"; $result = PMA_queryAsControlUser($sql_query, false); if ($result) { - $html_output .= '' - . '' - . ''; - $i = 0; - while ($row = $GLOBALS['dbi']->fetchRow($result)) { - $i++; - $html_output .= '' - . '' - . '' - . ''; + if ($GLOBALS['dbi']->numRows($result) == 0) { + $html_output .= '

' + . __('No users were found belonging to this user group') + . '

'; + } else { + $html_output .= '
#' . __('User') . '
' . $i . ' ' . htmlspecialchars($row[0]) . '
' + . '' + . ''; + $i = 0; + while ($row = $GLOBALS['dbi']->fetchRow($result)) { + $i++; + $html_output .= '' + . '' + . '' + . ''; + } + $html_output .= '' + . '
#' . __('User') . '
' . $i . ' ' . htmlspecialchars($row[0]) . '
'; } - $html_output .= '' - . ''; - } else { - $html_output .= '

' - . __('No users were found belonging to this user group') - . '

'; } return $html_output; }