In my Zend framework project I want to check whether a cookie is set. If it is the case I want to use the cookie contents to login a user.
Since it is neccessary for me to do this automatic login before any controller is called I tried to put it in the Bootstrap. There I want to check the database if the user information is valid. Unfortunately at this point the default database adapter is not yet initialized.
So my question is the following: Where do I put those stuff that should be executed before any controller is called and after all initializing/bootstrapping stuff is done?
I’have not a great experience with Zend Framework but I think you should create a custom generic controller for example GenericController that extends the Zend_Controller_Action and put your code in the preDispatch() function. All your controllers will then a subclass of your custom controller, for example: