コード例 #1
0
ファイル: SearchForm.class.php プロジェクト: nick-strohm/WCF
 /**
  * @see wcf\form\IForm::submit()
  */
 public function submit()
 {
     try {
         parent::submit();
     } catch (NamedUserException $e) {
         WCF::getTPL()->assign('errorMessage', $e->getMessage());
     }
 }
コード例 #2
0
ファイル: LoginForm.class.php プロジェクト: nick-strohm/WCF
 /**
  * @see	\wcf\form\IForm::submit()
  */
 public function submit()
 {
     parent::submit();
     // save authentication failure
     if (ENABLE_USER_AUTHENTICATION_FAILURE) {
         if ($this->errorField == 'username' || $this->errorField == 'password') {
             $action = new UserAuthenticationFailureAction(array(), 'create', array('data' => array('environment' => RequestHandler::getInstance()->isACPRequest() ? 'admin' : 'user', 'userID' => $this->user !== null ? $this->user->userID : null, 'username' => $this->username, 'time' => TIME_NOW, 'ipAddress' => UserUtil::getIpAddress(), 'userAgent' => UserUtil::getUserAgent())));
             $action->executeAction();
             if ($this->captchaObjectType) {
                 $this->captchaObjectType->getProcessor()->reset();
             }
         }
     }
 }