src/Security/CMSSecurity.php
public function success()
    {
        // Ensure member is properly logged in
        if (!Security::getCurrentUser() || !class_exists(AdminRootController::class)) {
            return $this->redirectToExternalLogin();
        }

        // Get redirect url
        $controller = $this->getResponseController(_t(__CLASS__ . '.SUCCESS', 'Success'));
        $backURLs = array(
            $this->getRequest()->requestVar('BackURL'),
            $this->getRequest()->getSession()->get('BackURL'),
            Director::absoluteURL(AdminRootController::config()->get('url_base'), true),
        );
        $backURL = null;
        foreach ($backURLs as $backURL) {
            if ($backURL && Director::is_site_url($backURL)) {
                break;
            }
        }

        // Show login
        $controller = $controller->customise(array(
            'Content' => DBField::create_field(DBHTMLText::class, _t(
                __CLASS__ . '.SUCCESSCONTENT',
                '<p>Login success. If you are not automatically redirected ' . '<a target="_top" href="{link}">click here</a></p>',
                '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'));
    }
public function success()
    {
        // Ensure member is properly logged in
        if (!Security::getCurrentUser() || !class_exists(AdminRootController::class)) {
            return $this->redirectToExternalLogin();
        }

        // Get redirect url
        $controller = $this->getResponseController(_t(__CLASS__ . '.SUCCESS', 'Success'));
        $backURLs = array(
            $this->getRequest()->requestVar('BackURL'),
            $this->getRequest()->getSession()->get('BackURL'),
            Director::absoluteURL(AdminRootController::config()->get('url_base'), true),
        );
        $backURL = null;
        foreach ($backURLs as $backURL) {
            if ($backURL && Director::is_site_url($backURL)) {
                break;
            }
        }

        // Show login
        $controller = $controller->customise(array(
            'Content' => DBField::create_field(DBHTMLText::class, _t(
                __CLASS__ . '.SUCCESSCONTENT',
                '<p>Login success. If you are not automatically redirected ' . '<a target="_top" href="{link}">click here</a></p>',
                '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'));
    }
public function success ( ) { // Ensure member is properly logged in if ( ! Security :: getCurrentUser ( ) || ! class_exists ( AdminRootController :: class ) ) { return $ this -> redirectToExternalLogin ( ) ; } // Get redirect url $ controller = $ this -> getResponseController ( _t ( __CLASS__ . '.SUCCESS' , 'Success' ) ) ; $ backURLs = array ( $ this -> getRequest ( ) -> requestVar ( 'BackURL' ) , $ this -> getRequest ( ) -> getSession ( ) -> get ( 'BackURL' ) , Director :: absoluteURL ( AdminRootController :: config ( ) -> get ( 'url_base' ) , true ) , ) ; $ backURL = null ; foreach ( $ backURLs as $ backURL ) { if ( $ backURL && Director :: is_site_url ( $ backURL ) ) { break ; } } // Show login $ controller = $ controller -> customise ( array ( 'Content' => DBField :: create_field ( DBHTMLText :: class , _t ( __CLASS__ . '.SUCCESSCONTENT' , '<p>Login success. If you are not automatically redirected ' . '<a target="_top" href="{link}">click here</a></p>' , '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' ) ) ; }
Given a successful login, tell the parent frame to close the dialog

@return HTTPResponse|DBField
Given a successful login tell the parent frame to close the dialog