Added method to reset entire user storage
authorAlexander Ebert <ebert@woltlab.com>
Tue, 29 Jan 2013 00:38:49 +0000 (01:38 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 29 Jan 2013 00:38:49 +0000 (01:38 +0100)
Any suggestions for a proper method name?

wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php

index 108bf331dca7218207ea7193d109329f6f64d721..416bdffe9ebf616b3b2b37962c878edde8e24864 100644 (file)
@@ -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);
+       }
 }