Hide the likes tab if the user may not view likes
authorAlexander Ebert <ebert@woltlab.com>
Sat, 2 Nov 2019 23:34:47 +0000 (00:34 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 2 Nov 2019 23:34:47 +0000 (00:34 +0100)
wcfsetup/install/files/lib/system/menu/user/profile/content/LikesUserProfileMenuContent.class.php

index 2c9b2427e2ee86f23d76427b1be594be07ea76c1..fa564982f9ea10423c58888c8692ef3b73192a87 100644 (file)
@@ -36,6 +36,10 @@ class LikesUserProfileMenuContent extends SingletonFactory implements IUserProfi
         * @inheritDoc
         */
        public function isVisible($userID) {
+               if (!WCF::getSession()->getPermission('user.like.canViewLike')) {
+                       return false;
+               }
+               
                return true;
        }
 }