changeset 4688:3e4e67bcbedd

fix exception when trying to logout while not being logged in
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 19 Apr 2009 00:38:06 +0200
parents 2064407bfefd
children bd3f5ccf6fb6
files MoinMoin/auth/__init__.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/auth/__init__.py	Sun Apr 19 00:19:12 2009 +0200
+++ b/MoinMoin/auth/__init__.py	Sun Apr 19 00:38:06 2009 +0200
@@ -403,6 +403,10 @@
 
 def handle_logout(request, userobj):
     """ Logout the passed user from every configured authentication method. """
+    if userobj is None:
+        # not logged in
+        return userobj
+
     if userobj.auth_method == 'setuid':
         # we have no authmethod object for setuid
         userobj = request._setuid_real_user