[web2py] Re: Multiple users on computer and authorization with Janrian (RPX)

2011-02-02 Thread ron_m
I put this chunk of code in models/menu.py just after the index item and before the rest of the menu because I didn't want the other menu items exposed if not logged in. Your case may vary but the code should be the same, just placement. if auth.user: #print 'menu: ', auth.user_id, auth.use

[web2py] Re: Multiple users on computer and authorization with Janrian (RPX)

2011-02-03 Thread devGS
Thanks a lot for your response, I tried to follow it but got a "Not defined" error for the clean_session() function you'd mentioned. I tried to force "session.clear" at the begging of modules/menu.py, but the after logging out from my app, Janrain's plugin still recognized me with "Welcome back" an

[web2py] Re: Multiple users on computer and authorization with Janrian (RPX)

2011-02-03 Thread ron_m
Sorry, I didn't explain well enough. The clean_session() function is something I wrote to reset all session variables in the case the user is a different person logging in from the same machine. So it contains lines like: session.var1 = None session.dict1 = {} etc. The nutshell is an expressi

[web2py] Re: Multiple users on computer and authorization with Janrian (RPX)

2011-02-03 Thread devGS
Thanks a lot, could you post the complete code of your clean_session()? (Why is session.forget is not sufficient?) You also mentioned the placement of the above code in a model, why not in a controller within the logout? On Feb 4, 4:09 am, ron_m wrote: > Sorry, I didn't explain well enough. > >

[web2py] Re: Multiple users on computer and authorization with Janrian (RPX)

2011-02-03 Thread ron_m
session.forget() will prevent you from adding to the session from that line forward because it inhibits storing of the session to the file at the end of the request. I only wanted to remove session variables if the new user was not the same as the previous use logged into the application from th