Fixed missing access to user option values
authorMarcel Werk <burntime@woltlab.com>
Thu, 9 Jan 2014 20:42:22 +0000 (21:42 +0100)
committerMarcel Werk <burntime@woltlab.com>
Thu, 9 Jan 2014 20:42:22 +0000 (21:42 +0100)
wcfsetup/install/files/lib/data/user/UserAction.class.php

index 8db5ef32c17ac34ec8f744394222e22be43da195..657f4f82620156be1ab8a97d630ecb49e1fbd8ab 100644 (file)
@@ -497,4 +497,28 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
                
                $this->unmarkItems();
        }
+       
+       /**
+        * @see \wcf\data\AbstractDatabaseObjectAction::readObjects()
+        */
+       protected function readObjects() {
+               if (empty($this->objectIDs)) {
+                       return;
+               }
+       
+               // get base class
+               $baseClass = call_user_func(array($this->className, 'getBaseClass'));
+       
+               // get objects
+               $sql = "SELECT          user_option_value.*, user_table.*
+                       FROM            wcf".WCF_N."_user user_table
+                       LEFT JOIN       wcf".WCF_N."_user_option_value user_option_value
+                       ON              (user_option_value.userID = user_table.userID)
+                       WHERE           user_table.userID IN (".str_repeat('?,', count($this->objectIDs) - 1)."?)";
+               $statement = WCF::getDB()->prepareStatement($sql);
+               $statement->execute($this->objectIDs);
+               while ($object = $statement->fetchObject($baseClass)) {
+                       $this->objects[] = new $this->className($object);
+               }
+       }
 }