/** * * @return array */ protected function _getLoginFailedResponse() { $response = array('success' => false, 'errorMessage' => "Wrong username or password!"); Tinebase_Auth_CredentialCache::getInstance()->getCacheAdapter()->resetCache(); if ($this->_hasCaptcha()) { $config_count = Tinebase_Core::getConfig()->captcha->count; if (!isset(Tinebase_Session::getSessionNamespace()->captcha['count'])) { Tinebase_Session::getSessionNamespace()->captcha['count'] = 1; } else { Tinebase_Session::getSessionNamespace()->captcha['count'] = Tinebase_Session::getSessionNamespace()->captcha['count'] + 1; } if (Tinebase_Session::getSessionNamespace()->captcha['count'] >= $config_count) { $rets = Tinebase_Controller::getInstance()->makeCaptcha(); $response = array('success' => false, 'errorMessage' => "Wrong username or password!", 'c1' => $rets['1']); } } else { Tinebase_Session::destroyAndMantainCookie(); } return $response; }