1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-22 09:24:21 +01:00

implementing logout

This commit is contained in:
kakwa 2015-05-28 01:23:22 +02:00
parent 0ae234383a
commit 3bb36d1a74

View File

@ -414,9 +414,14 @@ class LdapCherry(object):
def logout(self): def logout(self):
""" logout page """ 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" % { message = "user '%(user)s' logout" % {
'user': user 'user': username
} }
cherrypy.log.error( cherrypy.log.error(
msg = message, msg = message,