allow to search for multiple items and strip "contact_" prefix

This commit is contained in:
Ralf Becker 2019-07-18 15:27:06 +02:00
parent 76b0bac25e
commit 15d8e0d422

View File

@ -821,10 +821,17 @@ class Ldap
}
foreach($this->schema2egw as $mapping)
{
if (substr($egwSearchKey, 0, 8) === 'contact_')
{
$egwSearchKey = substr($egwSearchKey, 8);
}
if(($ldapSearchKey = $mapping[$egwSearchKey]))
{
$searchString = Api\Translation::convert($searchValue,$this->charset,'utf-8');
foreach((array)$searchValue as $val)
{
$searchString = Api\Translation::convert($val, $this->charset,'utf-8');
$searchFilter .= '('.$ldapSearchKey.'='.$wildcard.Api\Ldap::quote($searchString).$wildcard.')';
}
break;
}
}