From 17010e8f587dc2e822660da342b3dc64475f8f41 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 17 Oct 2013 20:58:43 +0200 Subject: [PATCH] Don't set Base User and Base Group when Base DN was detected, would case problems but does not provide any benefit. also make sure that empty string is saved instead of false for multiline values --- apps/user_ldap/lib/configuration.php | 3 +++ apps/user_ldap/lib/wizard.php | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/user_ldap/lib/configuration.php b/apps/user_ldap/lib/configuration.php index 460cd9e1dc..c8bf1c0948 100644 --- a/apps/user_ldap/lib/configuration.php +++ b/apps/user_ldap/lib/configuration.php @@ -243,6 +243,9 @@ class Configuration { $value = ''; } else { $value = preg_split('/\r\n|\r|\n/', $value); + if($value === false) { + $value = ''; + } } $this->setValue($varname, $value); diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php index a1d635faae..7b7ef45af4 100644 --- a/apps/user_ldap/lib/wizard.php +++ b/apps/user_ldap/lib/wizard.php @@ -424,11 +424,8 @@ class Wizard extends LDAPUtility { $i = stripos($this->configuration->ldapAgentName, 'dc='); if($i !== false) { $base = substr($this->configuration->ldapAgentName, $i); - if($this->testBaseDN($base)) { $this->applyFind('ldap_base', $base); - $this->applyFind('ldap_base_users', $base); - $this->applyFind('ldap_base_groups', $base); return $this->result; } } @@ -445,8 +442,6 @@ class Wizard extends LDAPUtility { $base2 = implode('dc=', $dparts); if($base !== $base2 && $this->testBaseDN($base2)) { $this->applyFind('ldap_base', $base2); - $this->applyFind('ldap_base_users', $base2); - $this->applyFind('ldap_base_groups', $base2); return $this->result; }