How to query LDAP based on array values?

Certified Associate Developer

Hello All,

Ldapsearch() function is returning only 1000 records at a time which creates imbalance between the number of users available and the number of users being return by this query. The total number of users available are around 5000 but the query returns only top 1000 records during its execution. One approach i'm thinking of is to query based on usernames available but i'm not getting any proper way to query based on array variable. Suppose there is a user with username "abc" then by using below query i'm able to get the users information i.e

"(&(objectClass=user)(objectcategory=person)(sAMAccountName="abc"))" but if i'm trying to use array variable its not returning any result. Can someone please help me to identify how exactly i can query for multiple usernames at a same time?

  Discussion posts and replies are publicly visible