On Tuesday, March 27, 2012 6:57:15 PM UTC-4, weheh wrote:
>
> I think I want a logout_bare() function so that I can logout via an ajax
> call without going through some contortions to avoid auth.logout()'s
> redirect.
>
> To be more specific, I want a link that says "logout". When clicked, it
> logs me out and executes an ajax callback rather than a redirect.
>
I guess it wouldn't be too hard to write your own function in that case:
def logout_bare():
if auth.user:
auth.log_event(auth.messages.logout_log, auth.user)
session.auth = None
Note, you may want to redirect to a non-protected page if the user happens
to be on a protected page when logging out.
Anthony