2010年2月3日星期三

[fw-auth] Re: ACL... but completely different

What is the best way to redirect from an action helper?

Obviously, if the authentication fails, I would like to redirect to the
login screen. I figured out that I can set the response to redirect like
this:

$response->setRedirect('/' . $this->_authController['controller'] . '/' .
$this->_authController['action']);

The trouble is that it seems to chug along doing it's thing before it
implements this redirection. It calls any other action helpers in the
stack, then it calls the controller action, and THEN it finally gets around
to redirecting. Any way I can get it to redirect immediately? This is from
the action helper postDispatch() method.

--
View this message in context: http://n4.nabble.com/ACL-but-completely-different-tp1299970p1461606.html
Sent from the Zend Auth mailing list archive at Nabble.com.

没有评论: