Skip to content

Commit a0de69b

Browse files
committed
foreach error in lib_ldap_pla.php:checkUniqueAttrs when uidpool is turned on - closes #20
1 parent a8c9abe commit a0de69b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/ds_ldap_pla.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,12 @@ public function checkUniqueAttrs($dn,$attrs) {
599599

600600
# Build our search filter to double check each attribute.
601601
$query['filter'] = '(|';
602-
foreach ($checkattrs as $attr)
602+
foreach ($checkattrs as $attr) {
603+
if (!is_array($attrs[$attr])) {
604+
$val = $attrs[$attr];
605+
$query['filter'] .= sprintf('(%s=%s)',$attr,$val);
606+
continue;
607+
}
603608
foreach ($attrs[$attr] as $val)
604609
if ($val)
605610
$query['filter'] .= sprintf('(%s=%s)',$attr,$val);

0 commit comments

Comments
 (0)