2 namespace wcf\system\message\embedded\object;
3 use wcf\system\cache\runtime\UserProfileRuntimeCache;
4 use wcf\system\html\input\HtmlInputProcessor;
7 * Parses embedded users.
9 * @author Alexander Ebert
10 * @copyright 2001-2016 WoltLab GmbH
11 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12 * @package WoltLabSuite\Core\System\Message\Embedded\Object
14 class UserMessageEmbeddedObjectHandler extends AbstractMessageEmbeddedObjectHandler {
18 public function parse(HtmlInputProcessor $htmlInputProcessor, array $embeddedData) {
20 if (!empty($embeddedData['user'])) {
21 for ($i = 0, $length = count($embeddedData['user']); $i < $length; $i++) {
22 $objectIDs[] = intval($embeddedData['user'][$i][0]);
26 return array_unique($objectIDs);
32 public function loadObjects(array $objectIDs) {
33 return UserProfileRuntimeCache::getInstance()->getObjects($objectIDs);