/** * Constructor. If nothing else, it also has to call the constructor of the parent * class, BlogAction with the same parameters */ function AdminLoginAction($actionInfo, $request) { $this->Action($actionInfo, $request); $this->_config =& Config::getConfig(); $this->_locale =& Locales::getLocale($this->_config->getValue("default_locale")); // data validation $this->registerFieldValidator("userName", new StringValidator()); $this->registerFieldValidator("userPassword", new StringValidator()); $view = new AdminDefaultView(); $view->setErrorMessage($this->_locale->tr("error_incorrect_username_or_password")); $this->setValidationErrorView($view); }
/** * Generates a page which shows an "access forbidden" message, prompting the user to * authenticate first using the login page. * @private */ function mustAuthenticatePage() { $view = new AdminDefaultView(); $locale = $this->getLocale(); $view->setErrorMessage($locale->tr("error_access_forbidden")); return $view->render(); }