summaryrefslogtreecommitdiffstats
path: root/accounts/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/utils.py')
-rw-r--r--accounts/utils.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/accounts/utils.py b/accounts/utils.py
index 87a2ba8..3b313d8 100644
--- a/accounts/utils.py
+++ b/accounts/utils.py
@@ -71,7 +71,7 @@ def login_user(username, password):
password = ensure_utf8(password)
try:
- g.user = g.ldap.auth(username, password)
+ g.user = current_app.user_backend.auth(username, password)
except ldap.INVALID_CREDENTIALS:
return False
except ldap.NO_SUCH_OBJECT:
@@ -242,10 +242,6 @@ def url_for(endpoint, **values):
else:
return u
-# used when we encounter inconsistent data etc
-class ShouldNotHappen(RuntimeError):
- pass
-
def get_backend(path, app):
module = path.rsplit(".", 1).pop()