Add additional check for post_deleteUser so we don't delete any non-user shares with the same name

remotes/origin/stable45
Michael Gapczynski 13 years ago
parent ea23854328
commit 1db1d40414
  1. 4
      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']));

Loading…
Cancel
Save