2009年5月31日星期日

Re: [fw-mvc] Preserve Session Across Controllers?

Have you tried using ZF's redirector helper?

$this->_redirect()

or

$this->_helper->redirector('target', 'example');


I'm not certain, but I think the first one is just an alias to the
other - could someone confirm this?

-Ed

On Sun, May 31, 2009 at 3:28 AM, swidnikk<da.webs@gmail.com> wrote:
>
> In a solution I'm working on, I have two controllers,
> + admin controller
> + my controller
>
> In short, I need to authenticate a user from 'my controller' and then pass
> on the request to the admin controller. Authentication currently works with
> a session variable which has a method 'isLoggedOn()'.
>
> My issue is that the session which I create in 'my controller' does not
> persist when I redirect to the 'admin controller'. Any thoughts on this?
>
> Here is how I redirect:
>
> $request->setRouteName('adminhtml')
>                                        ->setControllerName('adminhtml')
>                                        ->setActionName('index')
>                                        ->setModuleName('admin')
>                                        ->setDispatched(false);
>
>
> --
> View this message in context: http://www.nabble.com/Preserve-Session-Across-Controllers--tp23801799p23801799.html
> Sent from the Zend MVC mailing list archive at Nabble.com.
>
>

没有评论: