From e0cee43cf0a3899567f50a5fb03d867fc2f0327a Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 4 Apr 2016 12:28:19 +0200 Subject: 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 --- lib/private/Share20/Hooks.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lib/private/Share20/Hooks.php (limited to 'lib/private/Share20/Hooks.php') diff --git a/lib/private/Share20/Hooks.php b/lib/private/Share20/Hooks.php new file mode 100644 index 00000000000..93669974b28 --- /dev/null +++ b/lib/private/Share20/Hooks.php @@ -0,0 +1,27 @@ + + * + * @copyright Copyright (c) 2016, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see + * + */ +namespace OC\Share20; + +class Hooks { + public static function post_deleteUser($arguments) { + \OC::$server->getShareManager()->userDeleted($arguments['uid']); + } +} -- cgit v1.2.3