diff options
Diffstat (limited to 'apps/federatedfilesharing/lib/federatedshareprovider.php')
-rw-r--r-- | apps/federatedfilesharing/lib/federatedshareprovider.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/lib/federatedshareprovider.php b/apps/federatedfilesharing/lib/federatedshareprovider.php index e54ce08fb04..a450b420cf4 100644 --- a/apps/federatedfilesharing/lib/federatedshareprovider.php +++ b/apps/federatedfilesharing/lib/federatedshareprovider.php @@ -563,4 +563,21 @@ class FederatedShareProvider implements IShareProvider { return $nodes[0]; } + /** + * A user is deleted from the system + * So clean up the relevant shares. + * + * @param string $uid + * @param int $shareType + */ + public function userDeleted($uid, $shareType) { + //TODO: probabaly a good idea to send unshare info to remote servers + + $qb = $this->dbConnection->getQueryBuilder(); + + $qb->delete('share') + ->where($qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share::SHARE_TYPE_REMOTE))) + ->andWhere($qb->expr()->eq('uid_owner', $qb->createNamedParameter($uid))) + ->execute(); + } } |