Browse Source

Bugfix

develop
Самоукин Алексей 12 years ago
parent
commit
abb0d66459
  1. 9
      pym/cl_ldap.py

9
pym/cl_ldap.py

@ -213,16 +213,17 @@ class ldapUser(_error):
else:
dictOut[dictAttr] = ""
elif dictAttr == "groups":
userGroups = []
userGroupsData = []
for groupDN in groupsDNs:
searchGroup = self.ldapObj.ldapSearch(groupDN,
ldap.SCOPE_ONELEVEL,
"%s=%s" %(ldapAttr,userName),
["cn"])
["cn","gidNumber"])
if searchGroup:
userGroups += map(lambda x: x[0][1]["cn"][0],
userGroupsData += map(lambda x: (x[0][1]["cn"][0],
x[0][1]["gidNumber"][0]),
searchGroup)
dictOut[dictAttr] = userGroups
dictOut[dictAttr] = userGroupsData
if uid and gid:
return dictOut
else:

Loading…
Cancel
Save