uninherited('admin_themes')); // Core styles / vendor scripts $admin = ModuleLoader::getModule('silverstripe/admin'); Requirements::javascript($admin->getResourcePath('client/dist/js/vendor.js')); Requirements::css($admin->getResourcePath('client/dist/styles/bundle.css')); } public function login($request = null, $service = Authenticator::CMS_LOGIN) { return parent::login($request, Authenticator::CMS_LOGIN); } public function Link($action = null) { /** @skipUpgrade */ return Controller::join_links(Director::baseURL(), "CMSSecurity", $action); } protected function getAuthenticator($name = 'cms') { return parent::getAuthenticator($name); } public function getApplicableAuthenticators($service = Authenticator::CMS_LOGIN) { return parent::getApplicableAuthenticators($service); } /** * Get known logged out member * * @return Member */ public function getTargetMember() { $tempid = $this->getRequest()->requestVar('tempid'); if ($tempid) { return Member::member_from_tempid($tempid); } return null; } public function getResponseController($title) { // Use $this to prevent use of Page to render underlying templates return $this; } protected function getSessionMessage(&$messageType = null) { $message = parent::getSessionMessage($messageType); if ($message) { return $message; } // Format return _t( __CLASS__.'.LOGIN_MESSAGE', '
Your session has timed out due to inactivity
' ); } /** * Check if there is a logged in member * * @return bool */ public function getIsloggedIn() { return !!Security::getCurrentUser(); } /** * Redirects the user to the external login page * * @return HTTPResponse */ protected function redirectToExternalLogin() { $loginURL = Security::create()->Link('login'); $loginURLATT = Convert::raw2att($loginURL); $loginURLJS = Convert::raw2js($loginURL); $message = _t( __CLASS__.'.INVALIDUSER', 'Invalid user. Please re-authenticate here to continue.
', 'Message displayed to user if their session cannot be restored', array('link' => $loginURLATT) ); $response = $this->getResponse(); $response->setStatusCode(200); $response->setBody(<<Login success. If you are not automatically redirected ' . 'click here
', 'Login message displayed in the cms popup once a user has re-authenticated themselves', array('link' => Convert::raw2att($backURL)) )) )); return $controller->renderWith($this->getTemplatesFor('success')); } }