开发者

Different session for admin and front end

Its my 1st App using ZF. As our client requirement i have made separate admin and front panel. Without usin开发者_JAVA技巧g Zend_Acl. I have problem when session expires it always takes me on front end log in page . I have tried to solve it by session but it's using single session for both admin anf front panel. I there any way so i can create separate session for both admin and front panel ?


abstract class My_Controller_Action extends Zend_Controller_Action
{     
    public function init()
    {
        parent::init();

        $this->auth = Zend_Auth::getInstance();
        if ($this->getRequest()->getModuleName() == 'admin') {
            $this->auth->setStorage(new Zend_Auth_Storage_Session('Zend_Auth_Admin'));
            $this->session = new Zend_Session_Namespace('AdminSession');
        } else {
            $this->session = new Zend_Session_Namespace('FrontSession');
        }
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜