mirror of
https://github.com/friendica/friendica
synced 2025-04-27 18:30:12 +00:00
Apply suggestions
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
9c6f6bcb95
commit
0209892631
2 changed files with 7 additions and 1 deletions
|
@ -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]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue