Merge pull request #15457 from frederic34/patch-22

Update ldap.class.php
This commit is contained in:
Laurent Destailleur 2020-11-20 13:37:24 +01:00 committed by GitHub
commit 07c192efb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -984,14 +984,12 @@ class Ldap
// Define filter
if (!empty($activefilter))
{
if (((string) $activefilter == '1' || (string) $activefilter == 'user') && $this->filter)
{
if (((string) $activefilter == '1' || (string) $activefilter == 'user') && $this->filter) {
$filter = '('.$this->filter.')';
} elseif (((string) $activefilter == 'member') && $this->filter)
{
} elseif (((string) $activefilter == 'member') && $this->filter) {
$filter = '('.$this->filtermember.')';
} else // If this->filter is empty, make fiter on * (all)
{
} else {
// If this->filter is empty, make fiter on * (all)
$filter = '('.$useridentifier.'=*)';
}
} else {
@ -1070,6 +1068,7 @@ class Ldap
*/
public function littleEndian($hex)
{
$result = '';
for ($x = dol_strlen($hex) - 2; $x >= 0; $x = $x - 2) {
$result .= substr($hex, $x, 2);
}