Skip to content
Snippets Groups Projects
Commit 1fc468df authored by Andreas Valder's avatar Andreas Valder
Browse files

missed a ldap entries

parent 70e57179
No related branches found
No related tags found
No related merge requests found
......@@ -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]}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment