Пример #1
0
 public function readParameters()
 {
     parent::readParameters();
     // user is already registered
     if (WCF::getUser()->userID) {
         throw new PermissionDeniedException();
     }
     // registration disabled
     if (REGISTER_DISABLED) {
         throw new NamedUserException(WCF::getLanguage()->get('wcf.user.register.error.disabled'));
     }
 }
Пример #2
0
	/**
	 * @see	wcf\page\IPage::readParameters()
	 */
	public function readParameters() {
		if (isset($_REQUEST['id'])) $this->userID = intval($_REQUEST['id']);
		$user = new User($this->userID);
		if (!$user->userID) {
			throw new IllegalLinkException();
		}
		
		$this->user = new UserEditor($user);
		if (!UserGroup::isAccessibleGroup($this->user->getGroupIDs())) {
			throw new PermissionDeniedException();
		}
		
		parent::readParameters();
	}
Пример #3
0
 /**
  * @see wcf\page\IPage::readParameters()
  */
 public function readParameters()
 {
     parent::readParameters();
     if (isset($_REQUEST['id'])) {
         $this->userID = intval($_REQUEST['id']);
     }
     $user = new User($this->userID);
     if (!$user->userID) {
         throw new IllegalLinkException();
     }
     $this->user = new UserEditor($user);
     if (!UserGroup::isAccessibleGroup($this->user->getGroupIDs())) {
         throw new PermissionDeniedException();
     }
     $this->optionHandler->setUser($this->user->getDecoratedObject());
     $this->optionHandler->showEmptyOptions();
 }
Пример #4
0
 /**
  * @see	\wcf\page\IPage::readParameters()
  */
 public function readParameters()
 {
     parent::readParameters();
     // user is already registered
     if (WCF::getUser()->userID) {
         throw new PermissionDeniedException();
     }
     // registration disabled
     if (REGISTER_DISABLED) {
         throw new NamedUserException(WCF::getLanguage()->get('wcf.user.register.error.disabled'));
     }
     // check disclaimer
     if (REGISTER_ENABLE_DISCLAIMER && !WCF::getSession()->getVar('disclaimerAccepted')) {
         HeaderUtil::redirect(LinkHandler::getInstance()->getLink('Disclaimer'));
         exit;
     }
     if (WCF::getSession()->getVar('__3rdPartyProvider')) {
         $this->isExternalAuthentication = true;
     }
 }