From b75f85019742da1d4b4b1e6dcaa4ed75c340718a Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 13 Aug 2024 11:51:29 +0200 Subject: [PATCH] fix ldap_search(): Argument #1 ($ldap) must be of type LDAP|array, string given --- api/src/Accounts/Ldap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Accounts/Ldap.php b/api/src/Accounts/Ldap.php index c393f211b0..459d81c29b 100644 --- a/api/src/Accounts/Ldap.php +++ b/api/src/Accounts/Ldap.php @@ -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];