sc_ldap_search( $filter = 'all', $attributes = array() )

This macro is used to perform searches in the LDAP.

Parameter Description
$filter 'all' or 'member':
'all' returns all information that the logged user can see.
'member' returns the information about that member
$attributes Array of LDAP filter options.

 

Ex:

$result = sc_ldap_search($filter, array('mail', 'displayname'));

Expected Return

Array (
[N] => Array ( [objectclass] => Array ( [count] => 4 [0] => inetOrgPerson [1] => organizationalPerson [2] => person [3] => top ) [0] => objectclass [cn] => Array ( [count] => 1 [0] => Albert Einstein ) [1] => cn [sn] => Array ( [count] => 1 [0] => Einstein ) [2] => sn [uid] => Array ( [count] => 1 [0] => einstein ) [3] => uid [mail] => Array ( [count] => 1 [0] => einstein@ldap.forumsys.com ) [4] => mail [telephonenumber] => Array ( [count] => 1 [0] => 314-159-2653 ) [5] => telephonenumber [count] => 6 [dn] => uid=einstein,dc=example,dc=com )
)