this function removes an object from the specified parent collections will be removed recursively you can pass an optional object query to remove only those objects which match the query an object will be deleted physically if it is the last instance the parameter array contains the required elements objectidentifier and parentidentifier if you want to remove a user or group parentidentifier can be skiped the optional parameter mode determines how the deletion is performed in normal mode the object will not be removed physically until all instances are removed in physical mode all instances of the object will be deleted imediately in removelinks mode all references to and from the objects will be deleted as well in nonrecursive the deletion is not performed recursive removing a collection which is not empty will cause an error 