mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
get adLDAPUsers::info() to return false again instead of throwing under PHP 8.x
This commit is contained in:
parent
58c3b19c8c
commit
293cf669a0
@ -1810,6 +1810,29 @@ class adLDAPUsers extends \adLDAPUsers
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find information about the users. Returned in a raw array format from AD.
|
||||
*
|
||||
* Reimplemented to deal with InvalidArgumentException caused by calling
|
||||
* ldap_search or ldap_get_entries under PHP 8.x.
|
||||
*
|
||||
* @param string $username The username to query
|
||||
* @param array $fields Array of parameters to query
|
||||
* @param bool $isGUID Is the username passed a GUID or a samAccountName
|
||||
*
|
||||
* @return array|false false on error
|
||||
*/
|
||||
public function info($username, $fields = null, $isGUID = false)
|
||||
{
|
||||
try {
|
||||
return parent::info($username, $fields, $isGUID);
|
||||
}
|
||||
catch(\InvalidArgumentException $e) {
|
||||
// ignore the exceptions caused by calling ldap_get_entries or ldap_get_entries under PHP 8.x
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user