diff --git a/data/users/externalldap.py b/data/users/externalldap.py index 6642e7279..cce256f47 100644 --- a/data/users/externalldap.py +++ b/data/users/externalldap.py @@ -12,7 +12,7 @@ logger = logging.getLogger(__name__) _DEFAULT_NETWORK_TIMEOUT = 10.0 # seconds _DEFAULT_TIMEOUT = 10.0 # seconds -_DEFAULT_PAGE_SIZE = 500 +_DEFAULT_PAGE_SIZE = 1000 class LDAPConnectionBuilder(object): @@ -276,13 +276,15 @@ class LDAPUsers(FederatedUsers): cookie='') search_flt = '(memberOf=%s,%s)' % (group_dn, self._base_dn) + attributes = [self._uid_attr, self._email_attr] for user_search_dn in self._user_dns: # Conduct the initial search for users that are a member of the group. if disable_pagination: - msgid = conn.search(user_search_dn, ldap.SCOPE_SUBTREE, search_flt) + msgid = conn.search(user_search_dn, ldap.SCOPE_SUBTREE, search_flt, attrlist=attributes) else: - msgid = conn.search_ext(user_search_dn, ldap.SCOPE_SUBTREE, search_flt, serverctrls=[lc]) + msgid = conn.search_ext(user_search_dn, ldap.SCOPE_SUBTREE, search_flt, serverctrls=[lc], + attrlist=attributes) while True: if disable_pagination: