diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-09-28 21:42:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-28 21:42:55 +0200 |
commit | ef0760f84f7da2adbb44851aa8ff4f6fdbdf4720 (patch) | |
tree | 05966304139d36a5b4c55cde947a3d7baa53d05a /apps/dav/lib/DAV | |
parent | 2eaa2791b75f7c2c8c7892a5354f6e93fedaf396 (diff) | |
parent | 6c8bcb38f1124d0be7cee770ab67730d90dbd783 (diff) | |
download | nextcloud-server-ef0760f84f7da2adbb44851aa8ff4f6fdbdf4720.tar.gz nextcloud-server-ef0760f84f7da2adbb44851aa8ff4f6fdbdf4720.zip |
Merge pull request #1545 from nextcloud/delete-calendars-with-their-users
Delete calendars with their users
Diffstat (limited to 'apps/dav/lib/DAV')
-rw-r--r-- | apps/dav/lib/DAV/Sharing/Backend.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php index 006fe334ba2..f662d8e1b80 100644 --- a/apps/dav/lib/DAV/Sharing/Backend.php +++ b/apps/dav/lib/DAV/Sharing/Backend.php @@ -110,6 +110,14 @@ class Backend { ->execute(); } + public function deleteAllSharesByUser($principaluri) { + $query = $this->db->getQueryBuilder(); + $query->delete('dav_shares') + ->where($query->expr()->eq('principaluri', $query->createNamedParameter($principaluri))) + ->andWhere($query->expr()->eq('type', $query->createNamedParameter($this->resourceType))) + ->execute(); + } + /** * @param IShareable $shareable * @param string $element |