From 374e3475c9e2e0220cc8639a1a06f68b7f43fb2b Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 21 Jan 2014 23:58:48 +0100 Subject: Also remove the user's home storage from the storage table when deleting a user --- lib/private/files/cache/storage.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/private/files/cache') 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)); + } } -- cgit v1.2.3