From 30871e70b191aa0af5d7cf81220074a3bf5a0b4a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 29 Jan 2013 01:38:49 +0100 Subject: [PATCH] Added method to reset entire user storage Any suggestions for a proper method name? --- .../system/user/storage/UserStorageHandler.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php b/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php index 108bf331dc..416bdffe9e 100644 --- a/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php @@ -185,4 +185,14 @@ class UserStorageHandler extends SingletonFactory { $this->resetFields = $this->updateFields = array(); } + + /** + * Removes the entire user storage data. + */ + public function nukeStorage() { + $this->resetFields = $this->updateFields = array(); + + $sql = "DELETE FROM wcf".WCF_N."_user_storage"; + $statement = WCF::getDB()->prepareStatement($sql); + } } -- 2.20.1