示例#1
0
 public function createUser($email, $username, $password, $custom_register_fields, $check_spam = false)
 {
     if (empty($email)) {
         $this->status = 2;
         $this->errors[] = 'Email not provided for registration';
     } else {
         if (empty($username)) {
             $this->status = 2;
             $this->errors[] = 'Username not provided for registration';
         } else {
             $connection = new classTTConnection();
             if ($check_spam && $connection->checkSpam($email)) {
                 $this->errors[] = 'Your email or IP address matches that of a known spammer and therefore you cannot register here. If you feel this is an error, please contact the administrator or try again later.';
             } else {
                 $username = $this->validateUsername($username);
                 $password = $this->validatePassword($password);
                 $this->userInfo = $this->forumInterface->createUserHandle($email, $username, $password, $this->verified, $custom_register_fields, $this->TTProfile, $this->errors);
             }
         }
     }
 }
 public function createUser($email, $username, $password, $custom_register_fields, $check_spam = false)
 {
     if (empty($email)) {
         $this->status = 2;
         $this->errors[] = 'Email not provided for registration';
     } else {
         if (empty($username)) {
             $this->status = 2;
             $this->errors[] = 'Username not provided for registration';
         } else {
             $connection = new classTTConnection();
             if ($check_spam && $connection->checkSpam($email)) {
                 $this->errors[] = 'Your email or IP address matches that of a known spammer and therefore you cannot register here. If you feel this is an error, please contact the administrator or try again later.';
             } else {
                 if (MbqMain::$oMbqConfig->getCfg('user.sign_in')->oriValue != MbqBaseFdt::getFdt('MbqFdtConfig.user.sign_in.range.support')) {
                     MbqError::alert('', '', '', MBQ_ERR_APP);
                 }
                 $oMbqWrEtUser = MbqMain::$oClk->newObj('MbqWrEtUser');
                 $username = $this->validateUsername($username);
                 $password = $this->validatePassword($password);
                 $this->oMbqEtUser = $oMbqWrEtUser->registerUser($username, $password, $email, $this->verified, $custom_register_fields, $this->TTProfile, $this->errors);
             }
         }
     }
 }