/**
  * Validates parameters to begin profile inline editing.
  */
 public function validateBeginEdit()
 {
     if (!empty($this->objectIDs) && count($this->objectIDs) == 1) {
         $userID = reset($this->objectIDs);
         $this->userProfile = UserProfile::getUserProfile($userID);
     }
     if ($this->userProfile === null || !$this->userProfile->userID) {
         throw new UserInputException('objectIDs');
     }
     if ($this->userProfile->userID != WCF::getUser()->userID) {
         if (!$this->userProfile->canEdit()) {
             throw new PermissionDeniedException();
         }
     } else {
         if (!$this->userProfile->canEditOwnProfile()) {
             throw new PermissionDeniedException();
         }
     }
 }