From 0a9a749174ab6e4f143a101b19a5dd0838a164cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 11 Oct 2022 09:49:45 +0200 Subject: Fix code style with codesniffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/user_ldap/lib/Wizard.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index 06b50448038..78773985a1e 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -375,8 +375,8 @@ class Wizard extends LDAPUtility { */ public function determineGroupsForGroups() { return $this->determineGroups('ldap_groupfilter_groups', - 'ldapGroupFilterGroups', - false); + 'ldapGroupFilterGroups', + false); } /** @@ -385,7 +385,7 @@ class Wizard extends LDAPUtility { */ public function determineGroupsForUsers() { return $this->determineGroups('ldap_userfilter_groups', - 'ldapUserFilterGroups'); + 'ldapUserFilterGroups'); } /** @@ -512,10 +512,10 @@ class Wizard extends LDAPUtility { $obclasses = ['groupOfNames', 'groupOfUniqueNames', 'group', 'posixGroup', '*']; $this->determineFeature($obclasses, - 'objectclass', - 'ldap_groupfilter_objectclass', - 'ldapGroupFilterObjectclass', - false); + 'objectclass', + 'ldap_groupfilter_objectclass', + 'ldapGroupFilterObjectclass', + false); return $this->result; } @@ -543,10 +543,10 @@ class Wizard extends LDAPUtility { //if filter is empty, it is probably the first time the wizard is called //then, apply suggestions. $this->determineFeature($obclasses, - 'objectclass', - 'ldap_userfilter_objectclass', - 'ldapUserFilterObjectclass', - empty($filter)); + 'objectclass', + 'ldap_userfilter_objectclass', + 'ldapUserFilterObjectclass', + empty($filter)); return $this->result; } @@ -567,7 +567,7 @@ class Wizard extends LDAPUtility { if ($displayName === '') { $d = $this->configuration->getDefaults(); $this->applyFind('ldap_group_display_name', - $d['ldap_group_display_name']); + $d['ldap_group_display_name']); } $filter = $this->composeLdapFilter(self::LFILTER_GROUP_LIST); @@ -1198,8 +1198,8 @@ class Wizard extends LDAPUtility { } $newItems = []; $state = $this->getAttributeValuesFromEntry($attributes, - $attr, - $newItems); + $attr, + $newItems); $dnReadCount++; $foundItems = array_merge($foundItems, $newItems); $this->resultCache[$dn][$attr] = $newItems; @@ -1242,7 +1242,7 @@ class Wizard extends LDAPUtility { $availableFeatures = $this->cumulativeSearchOnAttribute($objectclasses, $attr, - $dig, $maxEntryObjC); + $dig, $maxEntryObjC); if (is_array($availableFeatures) && count($availableFeatures) > 0) { natcasesort($availableFeatures); @@ -1321,8 +1321,8 @@ class Wizard extends LDAPUtility { } $lo = @$this->ldap->bind($cr, - $this->configuration->ldapAgentName, - $this->configuration->ldapAgentPassword); + $this->configuration->ldapAgentName, + $this->configuration->ldapAgentPassword); if ($lo === true) { $this->cr = $cr; return $cr; @@ -1370,7 +1370,7 @@ class Wizard extends LDAPUtility { //default ports $portSettings = array_merge($portSettings, - $this->getDefaultLdapPortSettings()); + $this->getDefaultLdapPortSettings()); return $portSettings; } -- cgit v1.2.3 From 1d2d6e864dfd66397f277f32e7910e93058f674a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 11 Oct 2022 09:54:04 +0200 Subject: Avoid double ldap_unbind in Wizard.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/user_ldap/lib/Wizard.php | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index 78773985a1e..19de55c091d 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -1093,7 +1093,6 @@ class Wizard extends LDAPUtility { } if ($login === true) { - $this->ldap->unbind($cr); $this->logger->debug( 'Wiz: Bind successful to Port '. $port . ' TLS ' . (int)$tls, ['app' => 'user_ldap'] -- cgit v1.2.3