From: Alexander Ebert Date: Mon, 2 Jul 2018 12:03:49 +0000 (+0200) Subject: The own user profile should be always accessible X-Git-Tag: 3.1.4~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=05faa298759b31d3d39100c7e7eb1cad51eea3d9;p=GitHub%2FWoltLab%2FWCF.git The own user profile should be always accessible --- diff --git a/wcfsetup/install/files/lib/data/user/UserProfile.class.php b/wcfsetup/install/files/lib/data/user/UserProfile.class.php index c4eb5c5c0f..e1ccf77a01 100644 --- a/wcfsetup/install/files/lib/data/user/UserProfile.class.php +++ b/wcfsetup/install/files/lib/data/user/UserProfile.class.php @@ -598,7 +598,17 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject { break; case self::ACCESS_FOLLOWING: - $data['result'] = ($this->isFollowing(WCF::getUser()->userID) ? true : false); + $result = false; + if (WCF::getUser()->userID) { + if (WCF::getUser()->userID == $this->userID) { + $result = true; + } + else if ($this->isFollowing(WCF::getUser()->userID)) { + $result = true; + } + } + + $data['result'] = $result; break; case self::ACCESS_NOBODY: