diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-01-21 23:58:48 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-01-21 23:58:48 +0100 |
commit | 374e3475c9e2e0220cc8639a1a06f68b7f43fb2b (patch) | |
tree | 6ba3fd129580215038e794de74f8f5e25ca5aeb4 /lib/private/files/cache | |
parent | 9851727b0d231e2c0af79a704af76d262d21f19d (diff) | |
download | nextcloud-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.php | 13 |
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)); + } } |