From: Cyperghost Date: Fri, 22 Mar 2024 11:35:30 +0000 (+0100) Subject: Correct the check if user can access the profile X-Git-Tag: 6.1.0_Alpha_1~142^2~9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fa3027ed1cad00bf4191801a3886812f638e51ea;p=GitHub%2FWoltLab%2FWCF.git Correct the check if user can access the profile --- diff --git a/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php b/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php index e0f852c40d..5fa4a34a40 100644 --- a/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php +++ b/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php @@ -100,9 +100,9 @@ class UserProfileCommentManager extends AbstractCommentManager implements IViewa } /** @see UserProfile::isProtected() */ - return !$user->getPermission('admin.general.canViewPrivateUserOptions') - && !$userProfile->isAccessible('canViewProfile', $user->userID) - && $userProfile->userID != $user->userID; + return $user->getPermission('admin.general.canViewPrivateUserOptions') + || $userProfile->isAccessible('canViewProfile', $user->userID) + || $userProfile->userID === $user->userID; } /**