From 1b57c765e879b5f6a99afc499ee5bd0b467810e3 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 5 Aug 2013 01:24:41 +0200 Subject: [PATCH] Fixed editing of foreign user profiles --- .../install/files/lib/data/user/UserProfileAction.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/UserProfileAction.class.php b/wcfsetup/install/files/lib/data/user/UserProfileAction.class.php index 8fd0de7325..4138405d4b 100644 --- a/wcfsetup/install/files/lib/data/user/UserProfileAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserProfileAction.class.php @@ -180,8 +180,10 @@ class UserProfileAction extends UserAction { throw new UserInputException('objectIDs'); } - if (!$this->userProfile->canEdit() && $this->userProfile->userID != WCF::getUser()->userID) { - throw new PermissionDeniedException(); + if ($this->userProfile->userID != WCF::getUser()->userID) { + if (!$this->userProfile->canEdit()) { + throw new PermissionDeniedException(); + } } else if (!$this->userProfile->canEditOwnProfile()) { throw new PermissionDeniedException(); -- 2.20.1