Thanks Anthony- I ended up doing just that. I created a user_session 
storage object that houses all user specific session vars, and clear that 
one object when appropriate:
session.user_session = Storage(user_id=auth.user_id)
session.user_session.my_vars = ...



On Tuesday, February 26, 2013 10:34:34 PM UTC-5, Anthony wrote:
>
> You could use auth.settings.login_onaccept and 
> auth.settings.logout_onlogout functions to clear the items from session 
> that you don't want to persist.
>
> On Tuesday, February 26, 2013 8:59:46 PM UTC-5, Yarin wrote:
>>
>> Normally when storing variables within the session object, they will 
>> persist throughout the entire browser session lifetime, regardless of 
>> whether a user is logged in.
>>
>> What's the best way to implement user-specific session storage- i.e. 
>> variables I want stored in session for as long as a particular user is 
>> logged in, but that get cleared on logout or when another user logs in on 
>> the same browser?
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to