Ok, this is my first run at querying ldap.
I am having a difficult time understand how ldap_search works
I connect to the ldap host like this:
But then the explanation of parametes from php.net does nothing for me in regards to ldap_search.
Could someone please tell me how to do a directory search for a specific username? (uid) and then return the the resulting surname?
I am so confused! Php.net explanations are terrible
Thanks,
Rons
cout << "If you don't know where you want to go, we'll make sure you get taken";
I am having a difficult time understand how ldap_search works
I connect to the ldap host like this:
Code:
[blue]
echo "Connecting....<br>";
$Connection = ldap_connect($LDAPhost);
echo "Connection result is " . $Connection . "<br/>";
$Bind = ldap_bind($Connection);
echo "Bind result is " . $Bind . "<br/>";
[/blue]
But then the explanation of parametes from php.net does nothing for me in regards to ldap_search.
Could someone please tell me how to do a directory search for a specific username? (uid) and then return the the resulting surname?
Code:
[red]
[green]//I have been trying this [/green]
$sr=ldap_search($Connection,"uid=test123","sn=*");
echo "Search result is " . $sr . "<br />";
[/red]
Code:
Results:
Connecting....
Connection result is Resource id #4
Bind result is 1
Warning: ldap_search() [function.ldap-search]: Search: No such object in
I am so confused! Php.net explanations are terrible
Thanks,
Rons
cout << "If you don't know where you want to go, we'll make sure you get taken";