Zend Framework: different login for frontend and backend

May 04, 2012 at 06:31
Zend Framework

Frontend and Backend are two modules and so I created a second Bootstrap.php in my modules/backend folder, which looks like this:
class Backend_Bootstrap extends Zend_Application_Module_Bootstrap
    public function _initAuth(){
        $auth = Zend_Auth::getInstance();
        $authStorage = new Zend_Auth_Storage_Session('Yourapp_Admin_Auth');
This seems to be enough to make a backend login independent frmo the frontend, keeping frontend users from seeing my backend just because they're logged in. Thanks to the ZF community for NOTHING.

Hinterlasse einen Kommentar: