diff --git a/setup/inc/class.setup.inc.php b/setup/inc/class.setup.inc.php index 44b581e830..f8bb255e6a 100644 --- a/setup/inc/class.setup.inc.php +++ b/setup/inc/class.setup.inc.php @@ -923,13 +923,10 @@ { return false; } - $memberships = array(); } - else - { - $memberships = $GLOBALS['egw']->accounts->memberships($accountid); - } - if($groupid) + $memberships = $GLOBALS['egw']->accounts->memberships($accountid,true); + + if($groupid && !in_array($groupid,$memberships)) { $memberships[] = $groupid;