Jump to content

ldap_search ignoring the case letter


Moalmamoun

Recommended Posts

hello my friends i'm trying to get some data from the active directory but i have a problem when the stored eamil in capital letters or mixed letters , i want the ldap_search() to search the AD ignoring the case of the letters here's my function and thank you in advance

function LDAPget($email)
{
$ldap['server'] = 'xx.xx.xx.xx';
$ldap['user'] = 'x';
$ldap['pass'] = 'any';
$ds = ldap_connect($ldap['server']);
$bind = ldap_bind($ds, $ldap['user'], $ldap['pass']);
$filter = "(mail=$email)";
$sr = ldap_search($ds, $ldap['base_dn'], $filter, array('*'));
$rows = ldap_get_entries($ds, $sr);
}
 

 

Link to comment
https://forums.phpfreaks.com/topic/283395-ldap_search-ignoring-the-case-letter/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.