Skip to content
Snippets Groups Projects
Commit cc6c940b authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Implement post_removeFromGroup()

parent 82dea705
No related branches found
No related tags found
No related merge requests found
......@@ -761,7 +761,16 @@ class Share {
}
public static function post_removeFromGroup($arguments) {
// TODO
$query = \OC_DB::prepare('SELECT id, share_type FROM *PREFIX*share WHERE (share_type = ? AND share_with = ?) OR (share_type = ? AND share_with = ?)');
$result = $query->execute(array(self::SHARE_TYPE_GROUP, $arguments['gid'], self::$shareTypeGroupUserUnique, $arguments['uid']));
while ($item = $result->fetchRow()) {
if ($item['share_type'] == self::SHARE_TYPE_GROUP) {
// Delete all reshares by this user of the group share
self::delete($item['id'], true, $arguments['uid']);
} else {
self::delete($item['id']);
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment