From 9c464f41c35d818d885d4867a926e3cb1120b67e Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Tue, 27 Feb 2018 08:48:53 +0100 Subject: [PATCH] Change variable declaration; fixes #3544 --- inc/authldap.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inc/authldap.class.php b/inc/authldap.class.php index 9ce3a09425a..0a4ff14b6b4 100644 --- a/inc/authldap.class.php +++ b/inc/authldap.class.php @@ -1767,9 +1767,8 @@ static function getAllUsers(array $options, &$results, &$limitexceeded) { } else { //Ldap synchronisation : look if the user exists in the directory //and compares the modifications dates (ldap and glpi db) - $userfound = false; - if (!empty($ldap_users[$user[$field_for_db]]) - || ($userfound = self::dnExistsInLdap($user_infos, $user['user_dn']))) { + $userfound = self::dnExistsInLdap($user_infos, $user['user_dn']); + if (!empty($ldap_users[$user[$field_for_db]]) || $userfound) { // userfound seems that user dn is present in GLPI DB but do not correspond to an GLPI user // -> renaming case if ($userfound) {