Correcting user name in logging
This commit is contained in:
parent
f1ed7575ff
commit
be0a5f5e99
@ -147,7 +147,7 @@ class SAuth(object):
|
||||
if(user is not None):
|
||||
pw=user.password
|
||||
if pw is None or not len(pw.split('/'))==3 :
|
||||
logger.warn("Login FAIL user {} from {}".format(user, ip))
|
||||
logger.warn("Login FAIL user {} from {}".format(username, ip))
|
||||
_redirect(fail_redirect)
|
||||
return False
|
||||
pw=pw.split('/')
|
||||
@ -158,11 +158,11 @@ class SAuth(object):
|
||||
if(pw[2]==pwtest):
|
||||
get_session()['username']=username
|
||||
get_session()['roles']=self.get_user_roles(username)
|
||||
logger.info("Login OK user {} from {}".format(user, ip))
|
||||
logger.info("Login OK user {} from {}".format(username, ip))
|
||||
if(success_redirect is not None):
|
||||
_redirect(success_redirect)
|
||||
return True
|
||||
logger.warn("Login FAIL user {} from {}".format(user, ip))
|
||||
logger.warn("Login FAIL user {} from {}".format(username, ip))
|
||||
_redirect(fail_redirect)
|
||||
return False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user