X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FGroup.php;h=fa41d26467fc704034b706306a7ee81975b69467;hb=624e4c192c7f837ac0587a50da6e1409081eb519;hp=da77335f12ed944a515bf26d74be052aadde0644;hpb=9c6f6bcb95213186a364ba00672c1f3c9556b85d;p=friendica.git diff --git a/src/Model/Group.php b/src/Model/Group.php index da77335f12..fa41d26467 100644 --- a/src/Model/Group.php +++ b/src/Model/Group.php @@ -358,14 +358,18 @@ class Group throw new HTTPException\NotFoundException('Group not found.'); } + $contactIds = []; + foreach ($contacts as $cid) { $cdata = Contact::getPublicAndUserContactID($cid, $group['uid']); if (empty($cdata['user'])) { throw new HTTPException\NotFoundException('Invalid contact.'); } - DBA::delete('group_member', ['gid' => $gid, 'contact-id' => $cdata['user']]); + $contactIds[] = $cdata['user']; } + + DBA::delete('group_member', ['gid' => $gid, 'contact-id' => $contactIds]); } /**