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