Zend Framework: different login for frontend and backend

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.