Remove the legacy popover API for user profiles
authorAlexander Ebert <ebert@woltlab.com>
Thu, 25 Jan 2024 11:36:48 +0000 (12:36 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 25 Jan 2024 15:29:59 +0000 (16:29 +0100)
wcfsetup/install/files/lib/data/user/UserProfileAction.class.php

index 2dce6faf06280c9b73c96efecd6c199297982f78..0ee15aa8539f2d6c1ccfb00827c35eb40f15fd2a 100644 (file)
@@ -137,41 +137,6 @@ class UserProfileAction extends UserAction implements IPopoverAction
         ]);
     }
 
-    /**
-     * @inheritDoc
-     */
-    public function validateGetPopover()
-    {
-        WCF::getSession()->checkPermissions(['user.profile.canViewUserProfile']);
-
-        if (\count($this->objectIDs) != 1) {
-            throw new UserInputException('objectIDs');
-        }
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function getPopover()
-    {
-        $userID = \reset($this->objectIDs);
-
-        if ($userID) {
-            $userProfile = UserProfileRuntimeCache::getInstance()->getObject($userID);
-            if ($userProfile) {
-                WCF::getTPL()->assign('user', $userProfile);
-            } else {
-                WCF::getTPL()->assign('unknownUser', true);
-            }
-        } else {
-            WCF::getTPL()->assign('unknownUser', true);
-        }
-
-        return [
-            'template' => WCF::getTPL()->fetch('userProfilePreview'),
-        ];
-    }
-
     /**
      * Validates detailed activity point list
      *