Make TUserLookupPageHandler reusable
authorMatthias Schmidt <gravatronics@live.com>
Sun, 18 Sep 2016 12:33:49 +0000 (14:33 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 18 Sep 2016 12:33:49 +0000 (14:33 +0200)
… by changing the links in the suggestions from the user profile to the
actual content.

wcfsetup/install/files/lib/system/page/handler/TUserLookupPageHandler.class.php

index 38c157f03a3e387022829794261f9139d5f26ee7..805daf3c80f70dbd7a4148377e64fde0a6910eb0 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 namespace wcf\system\page\handler;
+use wcf\data\user\UserProfile;
 use wcf\data\user\UserProfileList;
 use wcf\system\cache\runtime\UserRuntimeCache;
 
@@ -32,7 +33,7 @@ trait TUserLookupPageHandler {
                foreach ($userList as $user) {
                        $results[] = [
                                'image' => $user->getAvatar()->getImageTag(48),
-                               'link' => $user->getLink(),
+                               'link' => $this->getLink($user->userID),
                                'objectID' => $user->userID,
                                'title' => $user->username
                        ];