Fixed editing of foreign user profiles
authorAlexander Ebert <ebert@woltlab.com>
Sun, 4 Aug 2013 23:24:41 +0000 (01:24 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 4 Aug 2013 23:24:41 +0000 (01:24 +0200)
wcfsetup/install/files/lib/data/user/UserProfileAction.class.php

index 8fd0de73253e6098b618d52887b661fa972ec16b..4138405d4b265ba8cdc7977c7081d0843b42b0cb 100644 (file)
@@ -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();