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
Oh yes, and sfUser-getAttribute() has a default option if there is no value
to get. In other words:
echo sfUser-getAttribute('value_i_want', default value);
If the session variable 'value_i_want' is set it returns that value else it
will return default value
On Fri, Sep 25, 2009 at 12:13 PM,
Thanks Gareth.
The point I am seeing is that in case user has logged out while the session
had not expired, user can still get back the session variables he has
created if logs-in again.
However say user opened a web page and forgot to do anything with that web
page and the session expired then
Like I said, on your login action, set the unset your own session variables
if you don't want the user to retain session variables on timeout of
session. Process is like this:
- User logs in the first time.
- During the course using the application your code sets certain session
variables.
- User
So, the solution is to check whether getAttribute is returning the default
value which could be due to two reasons
1. Session timeout
2. User still not has set the session variable
How do we find out if default is returned for which reason ? I hope I am
making sense.
Thanks
Deepak
On Fri, Sep
You don't. You pick sensible defaults where it's needed and where they
are not, or something is mandatory - you return null.
Examples:
Your site has multiple templates (look feel) - if the user doesn't
have something selected then you'll have a default (pretty in pink).
Your site
You mean that we use the default value when we need to else we use session
variable value.
But if session variable is null, it will still not return the default value.
Thanks
On Fri, Sep 25, 2009 at 4:46 PM, david da...@inspiredthinking.co.uk wrote:
You don't. You pick sensible defaults where
Yes it will. If that session variable does not exist (i.e. = null) it
returns default.
On Fri, Sep 25, 2009 at 1:32 PM, DEEPAK BHATIA toreachdee...@gmail.comwrote:
You mean that we use the default value when we need to else we use session
variable value.
But if session variable is null, it
So, I am sorry to repeat again
Then default value is returned whenever the session variable is null.
If it is iether null due to session expiry or forcefully made null.
On Fri, Sep 25, 2009 at 5:11 PM, Gareth McCumskey gmccums...@gmail.comwrote:
Yes it will. If that session variable does not
On Fri, 25 Sep 2009, DEEPAK BHATIA wrote:
So, I am sorry to repeat again
Then default value is returned whenever the session variable is null.
http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer#chapter_06_sub_accessing_the_user_session
--
10 matches
Mail list logo