From: Alexander Ebert Date: Tue, 29 Jan 2013 00:38:49 +0000 (+0100) Subject: Added method to reset entire user storage X-Git-Tag: 2.0.0_Beta_1~531^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=30871e70b191aa0af5d7cf81220074a3bf5a0b4a;p=GitHub%2FWoltLab%2FWCF.git Added method to reset entire user storage Any suggestions for a proper method name? --- 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); + } }