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
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
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
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.
>
>
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
5 matches
Mail list logo