summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/Hooks.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-04-04 12:28:19 +0200
committerRoeland Jago Douma <rullzer@owncloud.com>2016-04-04 14:15:38 +0200
commite0cee43cf0a3899567f50a5fb03d867fc2f0327a (patch)
tree5f0d5503b3d971e0b813bc14fd7956cf114abbfe /lib/private/Share20/Hooks.php
parentf6cea3c9c436142110504ba76320d57ca7899b27 (diff)
downloadnextcloud-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/Share20/Hooks.php')
-rw-r--r--lib/private/Share20/Hooks.php27
1 files changed, 27 insertions, 0 deletions
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 @@
+<?php
+/**
+ * @author Roeland Jago Douma <rullzer@owncloud.com>
+ *
+ * @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 <http://www.gnu.org/licenses/>
+ *
+ */
+namespace OC\Share20;
+
+class Hooks {
+ public static function post_deleteUser($arguments) {
+ \OC::$server->getShareManager()->userDeleted($arguments['uid']);
+ }
+}