Commit 85c255e5 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(core) Fix unicity filter logic

issue #5954
parent cf4ce890
......@@ -488,7 +488,7 @@ class Attribute
}
$infos = pluglist::pluginInfos(get_class($this->plugin));
if ($this->uniqueFilter === NULL) {
$filters = array_map(
$objectTypeFilters = array_map(
function ($key, $ot)
{
if (!is_numeric($key)) {
......@@ -504,6 +504,10 @@ class Attribute
array_keys($infos['plObjectType']),
array_values($infos['plObjectType'])
);
$filters = array();
if (!empty($objectTypeFilters)) {
$filters[] = '(|'.implode($objectTypeFilters).')';
}
$pluginFilter = call_user_func(array(get_class($this->plugin), 'getLdapFilter'));
if (!empty($pluginFilter)) {
$filters[] = $pluginFilter;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment