diff --git a/lang/en.yml b/lang/en.yml index 84fac9481..e75973795 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -1,7 +1,4 @@ en: - Security: - LOGIN: 'Log in' - LOGOUT: 'Log out' SilverStripe\AssetAdmin\Forms\UploadField: Dimensions: Dimensions EDIT: Edit @@ -315,6 +312,8 @@ en: CONFIRMLOGOUT: 'Please click the button below to confirm that you wish to log out.' ENTERNEWPASSWORD: 'Please enter a new password.' ERRORPASSWORDPERMISSION: 'You must be logged in in order to change your password!' + LOGIN: 'Log in' + LOGOUT: 'Log out' LOSTPASSWORDHEADER: 'Lost Password' NOTEPAGESECURED: 'That page is secured. Enter your credentials below and we will send you right along.' NOTERESETLINKINVALID: '

The password reset link is invalid or expired.

You can request a new one here or change your password after you logged in.

' diff --git a/src/Security/Security.php b/src/Security/Security.php index 4c03eed47..5938fe9f7 100644 --- a/src/Security/Security.php +++ b/src/Security/Security.php @@ -12,7 +12,6 @@ use SilverStripe\Control\HTTPRequest; use SilverStripe\Control\HTTPResponse; use SilverStripe\Control\HTTPResponse_Exception; use SilverStripe\Control\RequestHandler; -use SilverStripe\Control\Session; use SilverStripe\Core\ClassInfo; use SilverStripe\Core\Convert; use SilverStripe\Core\Injector\Injector; @@ -655,6 +654,7 @@ class Security extends Controller implements TemplateGlobalProvider * @param null|HTTPRequest $request * @param int $service * @return HTTPResponse|string Returns the "login" page as HTML code. + * @throws HTTPResponse_Exception */ public function login($request = null, $service = Authenticator::LOGIN) { @@ -684,7 +684,7 @@ class Security extends Controller implements TemplateGlobalProvider return $this->delegateToMultipleHandlers( $handlers, - _t('Security.LOGIN', 'Log in'), + _t(__CLASS__.'.LOGIN', 'Log in'), $this->getTemplatesFor('login'), [$this, 'aggregateTabbedForms'] ); @@ -721,7 +721,7 @@ class Security extends Controller implements TemplateGlobalProvider return $this->delegateToMultipleHandlers( $handlers, - _t('Security.LOGOUT', 'Log out'), + _t(__CLASS__.'.LOGOUT', 'Log out'), $this->getTemplatesFor('logout'), [$this, 'aggregateTabbedForms'] ); @@ -733,6 +733,7 @@ class Security extends Controller implements TemplateGlobalProvider * * @param int $service * @param HTTPRequest $request + * @return Authenticator[] * @throws HTTPResponse_Exception */ protected function getServiceAuthenticatorsFromRequest($service, HTTPRequest $request)