From: Marcel Werk Date: Thu, 9 Jan 2014 20:42:22 +0000 (+0100) Subject: Fixed missing access to user option values X-Git-Tag: 2.0.2~29 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ce246404ee623654a2e00548cbfe9a2d6964c78;p=GitHub%2FWoltLab%2FWCF.git Fixed missing access to user option values --- diff --git a/wcfsetup/install/files/lib/data/user/UserAction.class.php b/wcfsetup/install/files/lib/data/user/UserAction.class.php index 8db5ef32c1..657f4f8262 100644 --- a/wcfsetup/install/files/lib/data/user/UserAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserAction.class.php @@ -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); + } + } }