Benjamin Renard commited on 2018-02-13 10:59:01
Showing 1 changed files, with 5 additions and 0 deletions.
... | ... |
@@ -106,6 +106,11 @@ class LdapServer(object): |
106 | 106 |
return obj[0][0] |
107 | 107 |
|
108 | 108 |
def get_attr(self,obj,attr,all=None,default=None): |
109 |
+ if attr not in obj: |
|
110 |
+ for k in obj: |
|
111 |
+ if k.lower() == attr.lower(): |
|
112 |
+ attr = k |
|
113 |
+ break |
|
109 | 114 |
if all is not None: |
110 | 115 |
if attr in obj: |
111 | 116 |
return obj[attr] |
112 | 117 |