tags:

views:

45

answers:

1
function getUsers() {

     $process = new process();
     $process->s_Host('domain.com');
     $process->s_Domain('domain.com');   
     $process->s_LdapSecure(false);

      if($process->LdapConn()){
                   if($process->LdapBind()){     

             $filter = "(&(&(objectCategory=person)(objectClass=user)";     
             $search = @ldap_search($filter);  
             $entries = ldap_get_entries($search); 
         return $entries;

           }

     }
}

I am not able to return any values from the search, i dont know how to search or get all users.

The connection is working fine.

A: 

Shouldn't that be

$filter = "(&(objectClass=user)(objectCategory=person))";

This article might be of interest: LDAP Query Basics

Mitch Wheat
Is it common for all, i mean should we set something for person or user outta there.