Commit 044b31b3 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't show the button to add users to controlled groups they're already a member of

parent 3641f09f
......@@ -152,13 +152,15 @@ if (!empty($loggedinid) && $loggedinid != $userid) {
AND g.deleted = 0", array($userid,$loggedinid,$userid))) {
$controlledlist = array();
foreach ($groups as $group) {
if (array_key_exists($group->id, $userassocgroups)) {
if (array_key_exists($group->id, $allusergroups)) {
continue;
}
if ($group->jointype == 'request') {
$requestedlist[$group->id] = $group->name;
}
$controlledlist[$group->id] = $group->name;
else {
$controlledlist[$group->id] = $group->name;
}
}
$smarty->assign('requestedlist', join(', ', $requestedlist));
if (count($controlledlist) > 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment