From 1fc468df1a03c31ef43bea246be53418d532ef09 Mon Sep 17 00:00:00 2001 From: Andreas <andreasv@fsmpi.rwth-aachen.de> Date: Sun, 9 Oct 2016 18:50:16 +0200 Subject: [PATCH] missed a ldap entries --- db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db.py b/db.py index b1340c1..fe6ae4a 100644 --- a/db.py +++ b/db.py @@ -125,7 +125,7 @@ if 'LDAP_HOST' in config: conn = ldap3.Connection('ldaps://rumo.fsmpi.rwth-aachen.de', auto_bind=True) conn.search("ou=users,dc=fsmpi,dc=rwth-aachen,dc=de", "(uid=%s)"%user, attributes=ldap3.ALL_ATTRIBUTES) - if not conn.entries: + if not conn.response: return {} e = conn.response[0] return {'uid': user, 'givenName': e['attributes']['givenName'][0], 'sn':e['attributes']['sn'][0]} -- GitLab