Skip to content

Commit 5e4d4c8

Browse files
author
MariusBrill
committed
Add support for LDAP array values
1 parent 71e6b9f commit 5e4d4c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

script/ldap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ def fetch_users_of_group(group_name):
8888
if not mail:
8989
mail = login
9090
result.append({
91-
"login": login,
92-
"name": name,
93-
"email": mail
91+
"login": login if isinstance(login, str) else login[0],
92+
"name": name if isinstance(name, str) else name[0],
93+
"email": mail if isinstance(mail, str) else mail[0]
9494
})
9595
connection.unbind()
9696
return result

0 commit comments

Comments
 (0)