Yeah, I am not sure I want do a header redirect all the time. Anyone know if it is wise to instantiate the Action Helper Redirector in the plugin?
$redirector = new Zend_Controller_Action_Helper_Redirector(); $redirector->gotoRoute($urlOptions, '', true); Shaun J. Farrell Washington, DC (202) 713-5241 www.farrelley.com On Mon, Dec 7, 2009 at 8:39 AM, Jurian Sluiman <[email protected]>wrote: > The redirector is an action helper which you can't use inside front > controller > plugins. You have access though to the response object. You could inject > the > redirect header directly into the response object. > > Regards, Jurian > -- > Jurian Sluiman > CTO Soflomo V.O.F. > http://soflomo.com > > On Monday 07 Dec 2009 12:31:30 Shaun Farrell wrote: > > Ok so here is what I am doing. Before dispatch if the user is logged in > > and they have to reset their password then it will set the action and > the > > controller to the correct controller/action. > > This code below works fine. However, the url in the browser doesn't > > change. So if I come into the system at www.abc.com/profile and i need > to > > reset my pwd it will keep the url at www.abc.com/profile but the page > that > > shows is www.abc.com/login/resetpassword > > > > anyone know how to reset the url so that it changes. Can I use > > > > return $this->_helper->redirector(); > > > > public function preDispatch(Zend_Controller_Request_Abstract $request) > > { > > > > if (Zend_Auth::getInstance()->hasIdentity()) { > > //checks to make sure that the password doesn't need to be > > reset. > > if ("Y" === > > Zend_Auth::getInstance()->hasIdentity()->Reset_Password) { > > > > $request->setActionName('resetpassword')->setControllerName('Login'); > > return; > > } > > > > > > Thanks, > > > > Shaun J. Farrell > > Washington, DC > > www.farrelley.com > > >
