diff --git a/ldapcherry/__init__.py b/ldapcherry/__init__.py index 6ba7946..a104048 100644 --- a/ldapcherry/__init__.py +++ b/ldapcherry/__init__.py @@ -414,9 +414,14 @@ class LdapCherry(object): def logout(self): """ logout page """ - user = self.auth.end_session() + sess = cherrypy.session + username = sess.get(SESSION_KEY, None) + sess[SESSION_KEY] = None + if username: + cherrypy.request.login = None + message = "user '%(user)s' logout" % { - 'user': user + 'user': username } cherrypy.log.error( msg = message,