diff --git a/lib/GroupManager.php b/lib/GroupManager.php index e43b177b1..bdfbfd2c1 100644 --- a/lib/GroupManager.php +++ b/lib/GroupManager.php @@ -66,10 +66,7 @@ public function replaceGroups($uid, $samlGroups) { return; } $this->translateGroupToIds($samlGroups); - $assigned = $this->groupManager->getUserGroups($user); - $assigned = array_map(function(IGroup $group){ - return $group->getGID(); - }, $assigned); + $assigned = $this->groupManager->getUserGroupIds($user); $this->removeGroups($user, array_diff($assigned, $samlGroups)); $this->addGroups($user, array_diff($samlGroups, $assigned)); }