summaryrefslogtreecommitdiffstats
path: root/lib/private/files/cache
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-01-21 23:58:48 +0100
committerRobin Appelman <icewind@owncloud.com>2014-01-21 23:58:48 +0100
commit374e3475c9e2e0220cc8639a1a06f68b7f43fb2b (patch)
tree6ba3fd129580215038e794de74f8f5e25ca5aeb4 /lib/private/files/cache
parent9851727b0d231e2c0af79a704af76d262d21f19d (diff)
downloadnextcloud-server-374e3475c9e2e0220cc8639a1a06f68b7f43fb2b.tar.gz
nextcloud-server-374e3475c9e2e0220cc8639a1a06f68b7f43fb2b.zip
Also remove the user's home storage from the storage table when deleting a user
Diffstat (limited to 'lib/private/files/cache')
-rw-r--r--lib/private/files/cache/storage.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/files/cache/storage.php b/lib/private/files/cache/storage.php
index 5657cf06e12..6d7a1002c1b 100644
--- a/lib/private/files/cache/storage.php
+++ b/lib/private/files/cache/storage.php
@@ -70,4 +70,17 @@ class Storage {
return false;
}
}
+
+ /**
+ * remove the entry for the storage
+ *
+ * @param string $storageId
+ */
+ public static function remove($storageId) {
+ if (strlen($storageId) > 64) {
+ $storageId = md5($storageId);
+ }
+ $sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';
+ \OC_DB::executeAudited($sql, array($storageId));
+ }
}