diff --git a/sauth/__init__.py b/sauth/__init__.py index d2620b3..360b853 100644 --- a/sauth/__init__.py +++ b/sauth/__init__.py @@ -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