I see. looks like good to put the code in beforeFilter

On Sep 2, 4:27 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi guys,
> I was just wondering if doing a login check is what you are doing or
> if that was just an example?
>
> I ask because verifying login-status is not something you need to
> redirect back and forth for. That would usually be handled in a
> beforeFilter of the AppController or each controller requiring
> authentication.
>
> If you really do need to redirect then you may want to setup some
> generic function or component that can take $this->data and put it
> into a session and also do the reverse.
>
> /Martin
>
> On Sep 2, 8:43 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Thanks for your help.
>
> > I don't want to read the data from session again. Reading data from
> > session means I have to add code in Action A to handle the session.
> > there are a lot of actions like A, I really don't want to modify the
> > code.
>
> > On Sep 1, 10:42 pm, Preloader <[EMAIL PROTECTED]> wrote:
>
> > > Hello,
>
> > > if you store the data in the session, you don't have to pass it again,
> > > just read it where you need the data.
>
> > > Here you can find details on how to work with sessions in CakePHP:
>
> > >http://book.cakephp.org/view/173/sessions
>
> > > Regards, Christoph
>
> > > On 2 Sep., 06:23, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > Here is the scenario,
>
> > > > In view A, when user click the submit button in a form, action A
> > > > stores the data in session and then redirect to another action B. In
> > > > action B, it will check if user is login and then try to go back to
> > > > action A with the data in session just like that user clicked the
> > > > submit button again.
>
> > > > Now I could use method Redirect to go back to action A, but how to
> > > > pass the data in session?
>
> > > > I'd appreciate your help very much.- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to