fix ldap_search(): Argument #1 ($ldap) must be of type LDAP|array, string given

This commit is contained in:
ralf 2024-08-13 11:51:29 +02:00
parent 3063a28348
commit a76600d9b0

View File

@ -1099,7 +1099,7 @@ class Ldap
{ {
$attr = $which == 'account_lid' ? 'cn' : static::MAIL_ATTR; $attr = $which == 'account_lid' ? 'cn' : static::MAIL_ATTR;
if (($data = ldap_search($this->group_context, '(&('.$attr.'=' . $name . ")(objectclass=posixgroup)$this->group_filter)", ['gidNumber'])) && if (($data = $this->_ldap_search($this->group_context, '(&('.$attr.'=' . $name . ")(objectclass=posixgroup)$this->group_filter)", ['gidNumber'])) &&
!empty($data['gidnumber'][0])) !empty($data['gidnumber'][0]))
{ {
return -$data['gidnumber'][0]; return -$data['gidnumber'][0];