summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-03 15:16:23 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-03 15:16:23 +0100
commit577a094c6b786d9a96367e14fc308efe3b550adb (patch)
tree2ce149296cb0dd7d5c7489a789f862d364f790a0
parenta53394a2e77ba16241e8291d57782c636b6c042f (diff)
downloadwebadmin-577a094c6b786d9a96367e14fc308efe3b550adb.tar.gz
Correct function calls to obtain a base dn for roles
-rw-r--r--lib/Auth/LDAP.php24
1 files changed, 5 insertions, 19 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index b351593..33214e5 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -670,7 +670,7 @@ class LDAP extends Net_LDAP3 {
$this->bind($_SESSION['user']->user_bind_dn, $_SESSION['user']->user_bind_pw);
- $base_dn = $this->subject_base_dn('role');
+ $base_dn = $this->_subject_base_dn('role');
// TODO: The rdn is configurable as well.
// Use [$type_str . "_"]user_rdn_attr
@@ -750,24 +750,10 @@ class LDAP extends Net_LDAP3 {
}
// Check if the user_type has a specific base DN specified.
- $base_dn = $this->conf->get($this->domain, $type_str . "_user_base_dn");
- // If not, take the regular user_base_dn
- if (empty($base_dn))
- $base_dn = $this->conf->get($this->domain, "user_base_dn");
-
- // If no user_base_dn either, take the user type specific from the parent
- // configuration
- if (empty($base_dn))
- $base_dn = $this->conf->get('ldap', $type_str . "_user_base_dn");
-
- if (empty($base_dn))
- $base_dn = $this->conf->get('ldap', "user_base_dn");
-
- // If still no base dn to add the user to... use the toplevel dn
- if (empty($base_dn))
- $base_dn = $this->conf->get($this->domain, "base_dn");
- if (empty($base_dn))
- $base_dn = $this->conf->get('ldap', "base_dn");
+ $base_dn = $this->_subject_base_dn($type_str . "_user");
+ if (empty($base_dn)) {
+ $base_dn = $this->_subject_base_dn("user");
+ }
if (!empty($attrs['ou'])) {
$base_dn = $attrs['ou'];