Skip to content

Commit

Permalink
Use builtin user group ids getter
Browse files Browse the repository at this point in the history
  • Loading branch information
melegiul committed Jul 27, 2021
1 parent 0152278 commit 0912c7c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/GroupManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 0912c7c

Please sign in to comment.