src/Security/MemberAuthenticator/CMSLoginHandler.php
protected function redirectToChangePassword()
    {
        // Since this form is loaded via an iframe, this redirect must be performed via javascript
        $changePasswordForm = ChangePasswordForm::create($this, 'ChangePasswordForm');
        $changePasswordForm->sessionMessage(
            _t('SilverStripe\\Security\\Member.PASSWORDEXPIRED', 'Your password has expired. Please choose a new one.'),
            'good'
        );

        // Get redirect url
        $changePasswordURL = $this->addBackURLParam(Security::singleton()->Link('changepassword'));
        $changePasswordURLATT = Convert::raw2att($changePasswordURL);
        $changePasswordURLJS = Convert::raw2js($changePasswordURL);
        $message = _t(
            'SilverStripe\\Security\\CMSMemberLoginForm.PASSWORDEXPIRED',
            '<p>Your password has expired. <a target="_top" href="{link}">Please choose a new one.</a></p>',
            'Message displayed to user if their session cannot be restored',
            array('link' => $changePasswordURLATT)
        );

        // Redirect to change password page
        $response = HTTPResponse::create()
            ->setBody(<<<PHP
<!DOCTYPE html>
<html><body>
$message
<script type="application/javascript">
setTimeout(function(){top.location.href = "$changePasswordURLJS";}, 0);
</script>
</body></html>
PHP
        );
        return $response;
    }
protected function redirectToChangePassword()
    {
        // Since this form is loaded via an iframe, this redirect must be performed via javascript
        $changePasswordForm = ChangePasswordForm::create($this, 'ChangePasswordForm');
        $changePasswordForm->sessionMessage(
            _t('SilverStripe\\Security\\Member.PASSWORDEXPIRED', 'Your password has expired. Please choose a new one.'),
            'good'
        );

        // Get redirect url
        $changePasswordURL = $this->addBackURLParam(Security::singleton()->Link('changepassword'));
        $changePasswordURLATT = Convert::raw2att($changePasswordURL);
        $changePasswordURLJS = Convert::raw2js($changePasswordURL);
        $message = _t(
            'SilverStripe\\Security\\CMSMemberLoginForm.PASSWORDEXPIRED',
            '<p>Your password has expired. <a target="_top" href="{link}">Please choose a new one.</a></p>',
            'Message displayed to user if their session cannot be restored',
            array('link' => $changePasswordURLATT)
        );

        // Redirect to change password page
        $response = HTTPResponse::create()
            ->setBody(<<<PHP
<!DOCTYPE html>
<html><body>
$message
<script type="application/javascript">
setTimeout(function(){top.location.href = "$changePasswordURLJS";}, 0);
</script>
</body></html>
PHP
        );
        return $response;
    }
protected function redirectToChangePassword ( ) { // Since this form is loaded via an iframe, this redirect must be performed via javascript $ changePasswordForm = ChangePasswordForm :: create ( $ this , 'ChangePasswordForm' ) ; $ changePasswordForm -> sessionMessage ( _t ( 'SilverStripe\\Security\\Member.PASSWORDEXPIRED' , 'Your password has expired. Please choose a new one.' ) , 'good' ) ; // Get redirect url $ changePasswordURL = $ this -> addBackURLParam ( Security :: singleton ( ) -> Link ( 'changepassword' ) ) ; $ changePasswordURLATT = Convert :: raw2att ( $ changePasswordURL ) ; $ changePasswordURLJS = Convert :: raw2js ( $ changePasswordURL ) ; $ message = _t ( 'SilverStripe\\Security\\CMSMemberLoginForm.PASSWORDEXPIRED' , '<p>Your password has expired. <a target="_top" href="{link}">Please choose a new one.</a></p>' , 'Message displayed to user if their session cannot be restored' , array ( 'link' => $ changePasswordURLATT ) ) ; // Redirect to change password page $ response = HTTPResponse :: create ( ) -> setBody ( <<<PHP
<!DOCTYPE html>
<html><body>
$message
<script type="application/javascript">
setTimeout(function(){top.location.href = "$changePasswordURLJS";}, 0);
</script>
</body></html>
PHP ) ; return $ response ; }
Redirect the user to the change password form.

@skipUpgrade
@return HTTPResponse
Redirect the user to the change password form .