aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2016-04-07 13:01:10 +0200
committerJoas Schilling <nickvergessen@gmx.de>2016-04-07 13:01:10 +0200
commit0de15a86f057c8b0e88f353762059d4e0971b780 (patch)
tree718fc80fb91b2cf032998d49f655b4700cb26570 /lib/public
parent8932ec64a5d61691a506166ebbeeeb37af8b5106 (diff)
parente0cee43cf0a3899567f50a5fb03d867fc2f0327a (diff)
downloadnextcloud-server-0de15a86f057c8b0e88f353762059d4e0971b780.tar.gz
nextcloud-server-0de15a86f057c8b0e88f353762059d4e0971b780.zip
Merge pull request #23773 from owncloud/share_move_delete_user_hook
Migrate post_userDelete hook to share manager
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Share/IManager.php11
-rw-r--r--lib/public/Share/IShareProvider.php10
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php
index 64e5b554de9..e3780ac070c 100644
--- a/lib/public/Share/IManager.php
+++ b/lib/public/Share/IManager.php
@@ -150,6 +150,17 @@ interface IManager {
public function checkPassword(IShare $share, $password);
/**
+ * The user with UID is deleted.
+ * All share providers have to cleanup the shares with this user as well
+ * as shares owned by this user.
+ * Shares only initiated by this user are fine.
+ *
+ * @param string $uid
+ * @since 9.1.0
+ */
+ public function userDeleted($uid);
+
+ /**
* Instantiates a new share object. This is to be passed to
* createShare.
*
diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php
index d00b9da7b59..e201ba81ebc 100644
--- a/lib/public/Share/IShareProvider.php
+++ b/lib/public/Share/IShareProvider.php
@@ -146,4 +146,14 @@ interface IShareProvider {
* @since 9.0.0
*/
public function getShareByToken($token);
+
+ /**
+ * A user is deleted from the system
+ * So clean up the relevant shares.
+ *
+ * @param string $uid
+ * @param int $shareType
+ * @since 9.1.0
+ */
+ public function userDeleted($uid, $shareType);
}