fixed errors if group has no members

This commit is contained in:
Roland Gruber 2003-03-21 20:05:15 +00:00
parent c12e0b0713
commit ccc227e156
1 changed files with 5 additions and 2 deletions

View File

@ -51,8 +51,11 @@ for ($i = 0; $i < sizeof($info)-1; $i++) { // ignore last entry in array which i
echo ("<td class=\"userlist\">" . $info[$i]["cn"][0] . "</td>"); echo ("<td class=\"userlist\">" . $info[$i]["cn"][0] . "</td>");
echo ("<td class=\"userlist\">" . $info[$i]["gidnumber"][0] . "</td>"); echo ("<td class=\"userlist\">" . $info[$i]["gidnumber"][0] . "</td>");
// create list of group members // create list of group members
array_shift($info[$i]["memberuid"]); // delete count entry if (sizeof($info[$i]["memberuid"]) > 0) {
$grouplist = implode("; ", $info[$i]["memberuid"]); array_shift($info[$i]["memberuid"]); // delete count entry
$grouplist = implode("; ", $info[$i]["memberuid"]);
}
else $grouplist = "";
echo ("<td class=\"userlist\">" . $grouplist . "</td>"); echo ("<td class=\"userlist\">" . $grouplist . "</td>");
echo ("<td class=\"userlist\">" . $info[$i]["description"][0] . "</td>"); echo ("<td class=\"userlist\">" . $info[$i]["description"][0] . "</td>");
echo("</tr>"); echo("</tr>");