Browse Source

fixed errors if group has no members

master
Roland Gruber 21 years ago
parent
commit
ccc227e156
  1. 7
      lam/lib/listgroups.php

7
lam/lib/listgroups.php

@ -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]["gidnumber"][0] . "</td>");
// create list of group members
array_shift($info[$i]["memberuid"]); // delete count entry
$grouplist = implode("; ", $info[$i]["memberuid"]);
if (sizeof($info[$i]["memberuid"]) > 0) {
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\">" . $info[$i]["description"][0] . "</td>");
echo("</tr>");

Loading…
Cancel
Save