Пример #1
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     if (empty($_POST)) {
         // get visible languages
         $this->readVisibleLanguages();
         // default values
         $this->readDefaultValues();
     }
     parent::readData();
     // get avatar object
     if ($this->avatarType == 'custom') {
         $this->userAvatar = new UserAvatar($this->user->avatarID);
     }
 }
Пример #2
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     if ($this->useCaptcha && $this->captchaObjectTypeName) {
         $this->captchaObjectType = CaptchaHandler::getInstance()->getObjectTypeByName($this->captchaObjectTypeName);
         if ($this->captchaObjectType === null) {
             throw new SystemException("Unknown captcha object type with id '" . $this->captchaObjectTypeName . "'");
         }
         if (!$this->captchaObjectType->getProcessor()->isAvailable()) {
             $this->captchaObjectType = null;
         }
         if (WCF::getSession()->getVar('noRegistrationCaptcha')) {
             $this->captchaObjectType = null;
         }
     }
     parent::readData();
     if (empty($_POST)) {
         $this->languageID = WCF::getLanguage()->languageID;
         if (WCF::getSession()->getVar('__username')) {
             $this->username = WCF::getSession()->getVar('__username');
             WCF::getSession()->unregister('__username');
         }
         if (WCF::getSession()->getVar('__email')) {
             $this->email = $this->confirmEmail = WCF::getSession()->getVar('__email');
             WCF::getSession()->unregister('__email');
         }
         WCF::getSession()->register('registrationStartTime', TIME_NOW);
         // generate random field names
         $this->randomFieldNames = array('username' => UserRegistrationUtil::getRandomFieldName('username'), 'email' => UserRegistrationUtil::getRandomFieldName('email'), 'confirmEmail' => UserRegistrationUtil::getRandomFieldName('confirmEmail'), 'password' => UserRegistrationUtil::getRandomFieldName('password'), 'confirmPassword' => UserRegistrationUtil::getRandomFieldName('confirmPassword'));
         WCF::getSession()->register('registrationRandomFieldNames', $this->randomFieldNames);
     }
 }
Пример #3
0
 /**
  * @see \wcf\page\IPage::readData()
  */
 public function readData()
 {
     //if ($this->useCaptcha && $this->captchaObjectTypeName) {
     //    $this->captchaObjectType = CaptchaHandler::getInstance()->getObjectTypeByName($this->captchaObjectTypeName);
     //    if ($this->captchaObjectType === null) {
     //        throw new SystemException("Unknown captcha object type with id '".$this->captchaObjectTypeName."'");
     //    }
     //    if (!$this->captchaObjectType->getProcessor()->isAvailable()) {
     //        $this->captchaObjectType = null;
     //    }
     //    if (WCF::getSession()->getVar('noRegistrationCaptcha')) {
     //        $this->captchaObjectType = null;
     //    }
     //}
     parent::readData();
     if (empty($_POST)) {
         $this->languageID = WCF::getLanguage()->languageID;
         if (WCF::getSession()->getVar('__username')) {
             $this->username = WCF::getSession()->getVar('__username');
             WCF::getSession()->unregister('__username');
         }
         if (WCF::getSession()->getVar('__email')) {
             $this->email = $this->confirmEmail = WCF::getSession()->getVar('__email');
             WCF::getSession()->unregister('__email');
         }
         WCF::getSession()->register('registrationStartTime', TIME_NOW);
     }
 }
Пример #4
0
 /**
  * @see wcf\page\IPage::readData()
  */
 public function readData()
 {
     if (!count($_POST)) {
         // get visible languages
         $this->readVisibleLanguages();
         // default values
         $this->readDefaultValues();
     }
     parent::readData();
 }