aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-06 13:58:26 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-06 13:58:26 -0400
commit1db1d40414587c9adef663ef45aaa198c2b2ece0 (patch)
tree60328639e5f5168447b2b519dc6641c2728b8c39 /lib
parentea2385432817dcf5ad47396d83932f564aa76e4b (diff)
downloadnextcloud-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.php4
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']));