public function indexAction() { $settings = new Model_Settings(); $this->view->maintenanceEnabled = $settings->isMaintenanceMode(); $authAttempts = new Users_Model_AuthAttempts(); $attempt = $authAttempts->get(); $this->view->useCaptcha = $attempt && $attempt->surpassedMaxAllowed(); $this->view->loginForm = new Users_Form_Login(null, $this->view->base, $this->view->useCaptcha); if ($this->_config->SSL->enable_mixed_mode) { if ($this->_config->subdomain->enabled) { // in this case $this->view->base contains the full URL, so we just gotta replace the protocol $this->view->loginTargetBase = 'https' . substr($this->view->base, strpos($this->view->base, '://')); } else { $this->view->loginTargetBase = 'https://' . $_SERVER['HTTP_HOST'] . $this->view->base; } } else { $this->view->loginTargetBase = $this->view->base; } $this->view->allowRegistrations = $this->_config->environment->registrations_enabled; if ($this->user->role == Users_Model_User::ROLE_GUEST && @$_COOKIE['image']) { $images = new Users_Model_SigninImages(); $this->view->image = $images->getByCookie($_COOKIE['image']); } else { $this->view->image = false; } $this->view->yubikey = $this->_config->yubikey; $this->_helper->viewRenderer->setResponseSegment('sidebar'); }