diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-04-04 12:28:19 +0200 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-04-04 14:15:38 +0200 |
commit | e0cee43cf0a3899567f50a5fb03d867fc2f0327a (patch) | |
tree | 5f0d5503b3d971e0b813bc14fd7956cf114abbfe /lib/private/share/hooks.php | |
parent | f6cea3c9c436142110504ba76320d57ca7899b27 (diff) | |
download | nextcloud-server-e0cee43cf0a3899567f50a5fb03d867fc2f0327a.tar.gz nextcloud-server-e0cee43cf0a3899567f50a5fb03d867fc2f0327a.zip |
Migrate post_userDelete hook to share manager
This makes the post_userDelete hook call the sharemanager. This will
cleanup to and from this user.
* All shares owned by this user
* All shares with this user (user)
* All custom group shares
* All link share initiated by this user (to avoid invisible link shares)
Unit tests are added for the defaultshare provider as well as the
federated share provider
Diffstat (limited to 'lib/private/share/hooks.php')
-rw-r--r-- | lib/private/share/hooks.php | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/private/share/hooks.php b/lib/private/share/hooks.php index 750486ba80f..dae273eefb8 100644 --- a/lib/private/share/hooks.php +++ b/lib/private/share/hooks.php @@ -33,24 +33,6 @@ class Hooks extends \OC\Share\Constants { private static $updateTargets = array(); /** - * Function that is called after a user is deleted. Cleans up the shares of that user. - * @param array $arguments - */ - 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` = ? AND (`share_type` = ? OR `share_type` = ?)'); - $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'])); - while ($item = $result->fetchRow()) { - Helper::delete($item['id']); - } - } - - - /** * Function that is called before a user is added to a group. * check if we need to create a unique target for the user * @param array $arguments |