/** * @see \wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); if (!WCF::getUser()->userID) { return; } // check max pc permission if (ConversationHandler::getInstance()->getConversationCount() >= WCF::getSession()->getPermission('user.conversation.maxConversations')) { throw new NamedUserException(WCF::getLanguage()->get('wcf.conversation.error.mailboxIsFull')); } if (isset($_REQUEST['userID'])) { $userID = intval($_REQUEST['userID']); $user = UserProfile::getUserProfile($userID); if ($user === null || $user->userID == WCF::getUser()->userID) { throw new IllegalLinkException(); } // validate user try { Conversation::validateParticipant($user); } catch (UserInputException $e) { throw new NamedUserException(WCF::getLanguage()->getDynamicVariable('wcf.conversation.participants.error.' . $e->getType(), array('errorData' => array('username' => $user->username)))); } $this->participants = $user->username; } // get max text length $this->maxTextLength = WCF::getSession()->getPermission('user.conversation.maxLength'); // quotes MessageQuoteManager::getInstance()->readParameters(); }