From 2ce246404ee623654a2e00548cbfe9a2d6964c78 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 9 Jan 2014 21:42:22 +0100 Subject: [PATCH] Fixed missing access to user option values --- .../files/lib/data/user/UserAction.class.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) 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); + } + } } -- 2.20.1