foreach error in lib_ldap_pla.php:checkUniqueAttrs when uidpool is turned on - closes #20

This commit is contained in:
Deon George 2021-12-10 16:05:01 +11:00
parent a8c9abe22b
commit a0de69bd58

View File

@ -599,7 +599,12 @@ class ldap_pla extends ldap {
# Build our search filter to double check each attribute. # Build our search filter to double check each attribute.
$query['filter'] = '(|'; $query['filter'] = '(|';
foreach ($checkattrs as $attr) foreach ($checkattrs as $attr) {
if (!is_array($attrs[$attr])) {
$val = $attrs[$attr];
$query['filter'] .= sprintf('(%s=%s)',$attr,$val);
continue;
}
foreach ($attrs[$attr] as $val) foreach ($attrs[$attr] as $val)
if ($val) if ($val)
$query['filter'] .= sprintf('(%s=%s)',$attr,$val); $query['filter'] .= sprintf('(%s=%s)',$attr,$val);