mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-25 18:54:29 +01:00
implementing logout
This commit is contained in:
parent
0ae234383a
commit
3bb36d1a74
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user