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 702b3e9880
commit b75f850197

View File

@ -1099,7 +1099,7 @@ class Ldap
{
$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]))
{
return -$data['gidnumber'][0];