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

remotes/origin/stable6
Arthur Schiwon 13 years ago
parent 183dd813d3
commit 17010e8f58
  1. 3
      apps/user_ldap/lib/configuration.php
  2. 5
      apps/user_ldap/lib/wizard.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);

@ -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;
}

Loading…
Cancel
Save