tyteen4a03
Well-known member
Code:
*/
public function addUserGroupChange($userId, $key, $addGroups)
{
if (is_array($addGroups))
{
$addGroups = implode(',', $addGroups);
}
if (!$addGroups)
{
return true;
}
$oldGroups = $this->getUserGroupChangesForUser($userId);
$newGroups = $oldGroups;
if (isset($newGroups[$key]) && !$addGroups) // L1237
{
// already exists and we're removing the groups, so we can just remove the record
return $this->removeUserGroupChange($userId, $key);
}