2009年12月30日星期三

Re: [fw-auth] redirect after login from restricted page

Thanks for your responses. To clarify what I am doing, I am using Zend_Auth:

class MemberController extends Zend_Controller_Action
{
public function init()
{
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$this->view->identity = $auth->getIdentity();
} else {
$this->_redirect('/user/fail');
}
}
}

The above init() is in the MemberController and the redirect on fail sends
them to the UserController.

As an example if the email link sent to a registered member (who is not
logged in) is "http://localhost/member/index" they will be redirected to
'/user/fail' where they will be able to log in.

What I need help with is the best way to get them back to
"http://localhost/member/index" after they have successfully logged in.

So I'm thinking that I need to somehow attach the URL
("http://localhost/member/index") to the _redirect() and then somehow add it
to the $userForm->setAction().

Hopefully that helps - Thanks

--
View this message in context: http://n4.nabble.com/redirect-after-login-from-restricted-page-tp990697p991123.html
Sent from the Zend Auth mailing list archive at Nabble.com.

没有评论: