zend framework plug-in - predispatch()

HieveTeli

New Member
I wrote a plugin with predispatch() method to check access rights on each controller request . I have made plugin as :class My_Plugin_Checklogin extends Zend_Controller_Plugin_Abstract { public function preDispatch() {\[code\] if (isset($_SESSION['Zend_Auth_Static'])) { //no login $request = $this->getRequest(); //the request $request->setModuleName('default'); $request->setControllerName('index'); $request->setActionName('index'); //send to default/login/index }}\[/code\]}It's calling predispatch() before each controller request now.But also not allowing me to log in. always keeping me on login page due to predispatch method. How I have to set predispatch method.Please help.
 
Back
Top