diff --git a/mylib/ldap.py b/mylib/ldap.py index 3f09020..b7ed66a 100644 --- a/mylib/ldap.py +++ b/mylib/ldap.py @@ -448,6 +448,11 @@ class LdapClient: returned instead of the first value only (optinal, default: False) """ + if attr not in obj: + for k in obj: + if k.lower() == attr.lower(): + attr = k + break vals = obj.get(attr, []) if vals: return vals if all_values else vals[0]