http://framework.zend.com/manual/en/zend.session.advanced_usage.html#zend.session.advanced_usage.starting_a_session
swidnikk wrote:
>
> I hadn't tried that and now I'm getting somewhere. Thanks for pointing me
> in the right direction. Now my application returns an error from the
> controller I'm trying to target which says: "the session has already been
> started". Which is definitely a good sign.
>
>
>
>
>
> Ed Lazor-3 wrote:
>>
>> 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.
>>>
>>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Preserve-Session-Across-Controllers--tp23801799p23811157.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论