diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-06 13:58:26 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-06 13:58:26 -0400 |
commit | 1db1d40414587c9adef663ef45aaa198c2b2ece0 (patch) | |
tree | 60328639e5f5168447b2b519dc6641c2728b8c39 /lib | |
parent | ea2385432817dcf5ad47396d83932f564aa76e4b (diff) | |
download | nextcloud-server-1db1d40414587c9adef663ef45aaa198c2b2ece0.tar.gz nextcloud-server-1db1d40414587c9adef663ef45aaa198c2b2ece0.zip |
Add additional check for post_deleteUser so we don't delete any non-user shares with the same name
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/share.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index 1ebbbccc901..26dd1369a20 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -833,8 +833,8 @@ class Share { public static function post_deleteUser($arguments) { // Delete any items shared with the deleted user - $query = \OC_DB::prepare('DELETE FROM *PREFIX*share WHERE share_with = ?'); - $result = $query->execute(array($arguments['uid'])); + $query = \OC_DB::prepare('DELETE FROM *PREFIX*share WHERE share_with = ? AND share_type = ? OR share_type = ?'); + $result = $query->execute(array($arguments['uid'], self::SHARE_TYPE_USER, self::$shareTypeGroupUserUnique)); // Delete any items the deleted user shared $query = \OC_DB::prepare('SELECT id FROM *PREFIX*share WHERE uid_owner = ?'); $result = $query->execute(array($arguments['uid'])); |