OK,

I've confirmed it with $this->Session->valid(). The problem is the redirects
to the login page. Let me explain:


   1. We're logged in. This creates a session.
   2. Session expires.
   3. We try to access somewhere else, we jump into beforeFilter(), where
   Session is invalid.
   4. We are then redirected to the login page, back into beforeFilter(),
   this time with a fresh new session and no flash messages.

You can test with this dirt simple example:

   1. Set sessions in core to expire quickly (for testing) 10 seconds.
   2. Try to access restricted area (eg. Pages). You enter the
   beforeFilter() for the pages controller, with a new session. Then forwarded
   to the Users controller on the same session. Everything is fine. Flash
   Displays.
   3. Let session expire.
   4. Point browser to restricted area (not using the back button).
   Session is expired so, flash msg. not written properly.
   5. Redirected to Users controller for login on fresh session with no
   flash.

Any ideas?

On Wed, Feb 20, 2008 at 5:20 PM, Baz <[EMAIL PROTECTED]> wrote:

> They wanted something slightly different in that ticket. And I believe the
> functionality they wanted is already in $this->Session->valid()...
>
> I *think* my problem is that beforeFilter() is run twice: once with the
> invalid session, then another time for another redirect, with a new Session.
> So when the new session starts, I have no information about the old session.
> All the flash messages that have been set, get reset....
>
> I think...
>
>
> On Wed, Feb 20, 2008 at 2:19 PM, lemp <[EMAIL PROTECTED]> wrote:
>
> >
> > A ticket was opened a few months ago and was set to "wontfix".
> >
> > https://trac.cakephp.org/ticket/3404
> >
> > But I do agree this is quite annoying.
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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