summaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils.py b/utils.py
index 07c27a8..27dfb33 100644
--- a/utils.py
+++ b/utils.py
@@ -62,6 +62,8 @@ def login_user(username, password):
g.user = g.ldap.auth(username, password)
except ldap.INVALID_CREDENTIALS:
return False
+ except ldap.NO_SUCH_OBJECT:
+ return False
session['username'] = username
session['password'] = encrypt_password(password)