diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-01-13 15:29:53 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-20 16:32:56 +0100 |
commit | 483c6b68e2797a4608f5ff519ba961facdf8e9e4 (patch) | |
tree | d804635a0969b2431dfe4b1418bc8412ebab7880 /lib/private/files | |
parent | bc7bd0cd0532b8309d317c23ee4f13106e0a0e1d (diff) | |
download | nextcloud-server-483c6b68e2797a4608f5ff519ba961facdf8e9e4.tar.gz nextcloud-server-483c6b68e2797a4608f5ff519ba961facdf8e9e4.zip |
clear mount cache when removing applicables
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/config/usermountcache.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/private/files/config/usermountcache.php b/lib/private/files/config/usermountcache.php index e60c6d0400b..5fa192d1054 100644 --- a/lib/private/files/config/usermountcache.php +++ b/lib/private/files/config/usermountcache.php @@ -230,4 +230,21 @@ class UserMountCache implements IUserMountCache { ->where($builder->expr()->eq('user_id', $builder->createNamedParameter($user->getUID()))); $query->execute(); } + + public function removeUserStorageMount($storageId, $userId) { + $builder = $this->connection->getQueryBuilder(); + + $query = $builder->delete('mounts') + ->where($builder->expr()->eq('user_id', $builder->createNamedParameter($userId))) + ->andWhere($builder->expr()->eq('storage_id', $builder->createNamedParameter($storageId, \PDO::PARAM_INT))); + $query->execute(); + } + + public function remoteStorageMounts($storageId) { + $builder = $this->connection->getQueryBuilder(); + + $query = $builder->delete('mounts') + ->where($builder->expr()->eq('storage_id', $builder->createNamedParameter($storageId, \PDO::PARAM_INT))); + $query->execute(); + } } |