简体   繁体   中英

Comparing the LDAP GUID with LDAP, getting GUID with ldap_get_entries?

I want to use the GUID from LDAP accounts to identify these accounts in an application. I don't get it binary safe. If I compare these GUIDs with PHP with == , the result is true; if I use === , the result is false.

I thought this is the reason that I get no result. If I search which phpldap after the GUID.

I got the GUID with this code:

$justthese = array("ou", "sn", "givenname", "mail", "pager","objectGUID");            
$sr=ldap_search($ad, $basedn, $filter, $justthese);            
$info = ldap_get_entries($ad, $sr);

After that, I save the vars in a MySQL database. I've read that I should use ldap_get_values_len , but I don't know how to implement this in a query with multiple results.

The output looks similar to the from ldap_get_entries .

Am I only able to transform the result from ldap_get_entries (guid) , and am I able to compare these with LDAP? Or, do I have to use ldap_get_values_len , and how do I do that?

Consider comparing LDAP attribute values with matching rules instead of language comparison operators.

see also

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM