On Jan 7, 12:01 am, Robby Anderson <[EMAIL PROTECTED]> wrote:
> Duh. Much simpler way. (And isn't there usually?)
>
> To see if a session is new, just look for a specific "new session"
> session variable in your controller (or app_controller) afterFilter()
> method. If it doesn't exist, then you know this is a new session, and
> you can do whatever additional sessions operation you want (like save
> a history record, for example) - and then make sure to set the session
> variable.
>
> function afterFilter() {
>
>         // Check to see if the session exists
>         if ( !$this->Session->read('Session.sessionExists') ) {
>
>                 $this->Session->write('Session.sessionExists', true);
>
>                 // Do custom session operations here ...
>         }
>
> }

Thanks a lot Robby, your comments were very helpful.

--~--~---------~--~----~------------~-------~--~----~
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