$entry->add (ou => $ou);
$entry->add (cn => $name);
$entry->add (member => [map { _cn_to_dn ($_) } (@members)]);
- $entry->add (description => $desc);
+ $entry->add (description => $desc) if ($desc);
$entry->dn ($dn);
$entry->changetype ('add');
my $group_esc = uri_escape ($group_name);
my $desc = $group->description ();
- print qq#\t\t\t<li><a href="$MySelf?action=browse&group=$group_esc">$group_name</a> ($members Members)#;
+ print qq#\t\t\t<li><a href="$MySelf?action=browse&group=$group_esc">$group_name</a> ($members Member#, ($members == 1 ? ')' : 's)');
print qq(<br />\n\t\t\t\t<span class="description">$desc</span>) if ($desc);
print "</li>\n";
}
"\t\t\t</tr>\n";
}
}
+
+ my @groups = LiCoM::Group->load_by_member ($cn);
+ if (@groups)
+ {
+ my $num = scalar (@groups);
+ print "\t\t\t<tr>\n",
+ "\t\t\t\t<th", ($num == 1 ? '' : qq( rowspan="$num")), ">Group", ($num == 1 ? '' : 's'), "</th>\n";
+ for (my $i = 0; $i < $num; $i++)
+ {
+ my $group = $groups[$i];
+ my $group_name = $group->name ();
+ my $group_esc = uri_escape ($group_name);
+
+ print "\t\t\t<tr>\n" if ($i != 0);
+ print qq(\t\t\t\t<td><a href="$MySelf?action=browse&group=$group_esc">$group_name</a></td>\n),
+ "\t\t\t</tr>\n";
+ }
+ }
+
print <<EOF;
</table>