Add additional check for post_deleteUser so we don't delete any non-user shares with the same name
This commit is contained in:
parent
ea23854328
commit
1db1d40414
|
@ -833,8 +833,8 @@ class Share {
|
||||||
|
|
||||||
public static function post_deleteUser($arguments) {
|
public static function post_deleteUser($arguments) {
|
||||||
// Delete any items shared with the deleted user
|
// Delete any items shared with the deleted user
|
||||||
$query = \OC_DB::prepare('DELETE FROM *PREFIX*share WHERE share_with = ?');
|
$query = \OC_DB::prepare('DELETE FROM *PREFIX*share WHERE share_with = ? AND share_type = ? OR share_type = ?');
|
||||||
$result = $query->execute(array($arguments['uid']));
|
$result = $query->execute(array($arguments['uid'], self::SHARE_TYPE_USER, self::$shareTypeGroupUserUnique));
|
||||||
// Delete any items the deleted user shared
|
// Delete any items the deleted user shared
|
||||||
$query = \OC_DB::prepare('SELECT id FROM *PREFIX*share WHERE uid_owner = ?');
|
$query = \OC_DB::prepare('SELECT id FROM *PREFIX*share WHERE uid_owner = ?');
|
||||||
$result = $query->execute(array($arguments['uid']));
|
$result = $query->execute(array($arguments['uid']));
|
||||||
|
|
Loading…
Reference in New Issue