Skip to content

Commit

Permalink
Continue adding a user to a group until any of the group backends suc…
Browse files Browse the repository at this point in the history
…ceeds
  • Loading branch information
rotdrop committed Jul 11, 2023
1 parent ccd9ebb commit 7f71485
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/private/Group/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ public function addUser(IUser $user) {
}
foreach ($this->backends as $backend) {
if ($backend->implementsActions(\OC\Group\Backend::ADD_TO_GROUP)) {
$backend->addToGroup($user->getUID(), $this->gid);
try {
$backend->addToGroup($user->getUID(), $this->gid);
} catch (\Throwable $t) {
continue;
}
if ($this->users) {
$this->users[$user->getUID()] = $user;
}
Expand Down

0 comments on commit 7f71485

Please sign in to comment.