The session variables are not cleared automatically. If a user logs out only
the symfony authenticated variable is set to false and all the session data
you added to the user session is still available.

This is actually a GOOD thing. In our example, our interface uses a tabbing
system within the application stored in session. When a user logs out and
logs back in he still has the tabs he made previously. There are other
things that we manually remove from session on log out/log in.

One way to ensure that the users session is emptied when he logs in again is
on login manually set those session variables using sfUser->setParameter()
to nothing.

On Fri, Sep 25, 2009 at 12:13 PM, DEEPAK BHATIA <toreachdee...@gmail.com>wrote:

> "The session object for the current user is accessed in the action with the
> getUser() method and is an instance of the sfUser class. This class
> contains a parameter holder that allows you to store any user attribute in
> it. This data will be available to other requests until the end of the user
> session, as shown in Listing 6-15."
>
> ================================================
>
> Hi,
>
> I have taken above from the Chapter 6 - Inside The Controller Layer.
>
> When a the user sessions ends, the session variables will have the values
> returned as "NULL", I guess.
>
> So is it safe to redirect the action to error template in case session
> variables returns NULL ?
>
> For example, in the line of code below, I assume that I get something from
> 'allnames' session variable. However if it is "NULL", means the session is
> broken now.
>
> $current_name = $this->getUser()->getAttribute('allnames');
>
> Please suggest suitably.
>
> Thanks
>
> Deepak Bhatia
>
>
>
> >
>


-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to