git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@540
e071eeec-0327-468d-9b6a-
08194a12b294
def search_s(self, base, scope, filterstr, attrlist):
results = self.connection.search_s(base, scope, filterstr.encode(self.charset), attrlist)
def search_s(self, base, scope, filterstr, attrlist):
results = self.connection.search_s(base, scope, filterstr.encode(self.charset), attrlist)
for dn, attrs in results:
for field in attrs:
if field == "member" or field == "memberUid":
attrs[field] = convert(field, attrs[field], lambda x: x.decode(self.charset))
else:
attrs[field] = convert(field, attrs[field][0], lambda x: x.decode(self.charset))
for dn, attrs in results:
for field in attrs:
if field == "member" or field == "memberUid":
attrs[field] = convert(field, attrs[field], lambda x: x.decode(self.charset))
else:
attrs[field] = convert(field, attrs[field][0], lambda x: x.decode(self.charset))
+ output.append((dn.decode(self.charset), attrs))
+ return output
# FIXME: is this the right place to initialize the LDAP connection?
connection = LdapConnection(settings.LDAPDB_SERVER_URI,
# FIXME: is this the right place to initialize the LDAP connection?
connection = LdapConnection(settings.LDAPDB_SERVER_URI,