library/Garp/Controller/Plugin/Auth.php
protected function _redirectToLogin() {
        $this->_storeTargetUrl();

        $auth = Garp_Auth::getInstance();
        $authVars = $auth->getConfigValues();

        $flashMessenger = Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger');
        $flashMessenger->addMessage(!$auth->isLoggedIn() ?
            __($authVars['notLoggedInMsg']) : __($authVars['noPermissionMsg']));

        // Make sure the redirect is not cached
        Zend_Controller_Action_HelperBroker::getStaticHelper('cache')->setNoCacheHeaders(
            $this->getResponse());

        $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
        $redirectMethod = 'gotoUrlAndExit';
        $redirectParams = array('/g/auth/login');

        if (!empty($authVars['login']['route'])) {
            $redirectMethod = 'gotoRoute';
            $redirectParams = array(array(), $authVars['login']['route']);
        }
        call_user_func_array(array($redirector, $redirectMethod), $redirectParams);
    }
protected function _redirectToLogin() {
        $this->_storeTargetUrl();

        $auth = Garp_Auth::getInstance();
        $authVars = $auth->getConfigValues();

        $flashMessenger = Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger');
        $flashMessenger->addMessage(!$auth->isLoggedIn() ?
            __($authVars['notLoggedInMsg']) : __($authVars['noPermissionMsg']));

        // Make sure the redirect is not cached
        Zend_Controller_Action_HelperBroker::getStaticHelper('cache')->setNoCacheHeaders(
            $this->getResponse());

        $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
        $redirectMethod = 'gotoUrlAndExit';
        $redirectParams = array('/g/auth/login');

        if (!empty($authVars['login']['route'])) {
            $redirectMethod = 'gotoRoute';
            $redirectParams = array(array(), $authVars['login']['route']);
        }
        call_user_func_array(array($redirector, $redirectMethod), $redirectParams);
    }
protected function _redirectToLogin ( ) { $ this -> _storeTargetUrl ( ) ; $ auth = Garp_Auth :: getInstance ( ) ; $ authVars = $ auth -> getConfigValues ( ) ; $ flashMessenger = Zend_Controller_Action_HelperBroker :: getStaticHelper ( 'FlashMessenger' ) ; $ flashMessenger -> addMessage ( ! $ auth -> isLoggedIn ( ) ? __ ( $ authVars [ 'notLoggedInMsg' ] ) : __ ( $ authVars [ 'noPermissionMsg' ] ) ) ; // Make sure the redirect is not cached Zend_Controller_Action_HelperBroker :: getStaticHelper ( 'cache' ) -> setNoCacheHeaders ( $ this -> getResponse ( ) ) ; $ redirector = Zend_Controller_Action_HelperBroker :: getStaticHelper ( 'redirector' ) ; $ redirectMethod = 'gotoUrlAndExit' ; $ redirectParams = array ( '/g/auth/login' ) ; if ( ! empty ( $ authVars [ 'login' ] [ 'route' ] ) ) { $ redirectMethod = 'gotoRoute' ; $ redirectParams = array ( array ( ) , $ authVars [ 'login' ] [ 'route' ] ) ; } call_user_func_array ( array ( $ redirector , $ redirectMethod ) , $ redirectParams ) ; }
Redirect user to login page
@return Void
Redirect user to login page