summaryrefslogtreecommitdiffstats
path: root/lib/Auth
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-03-04 14:43:24 +0100
committerAleksander Machniak <machniak@kolabsys.com>2014-03-04 14:43:24 +0100
commit2a8ac19a13e682bd1e52b2364702414031f36767 (patch)
tree95d9aa20b06fd1d74be8944acf95abd3ddf95157 /lib/Auth
parent8e09ba6962f63bfcb0dcd6eee92250b352bec895 (diff)
downloadwebadmin-2a8ac19a13e682bd1e52b2364702414031f36767.tar.gz
Add support for organizational unit hierarchy
Diffstat (limited to 'lib/Auth')
-rw-r--r--lib/Auth/LDAP.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index 25bef97..83eb859 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -723,7 +723,13 @@ class LDAP extends Net_LDAP3 {
public function organizationalunit_add($attrs, $typeid = null)
{
- $base_dn = $this->entry_base_dn('ou', $typeid);
+ if (!empty($attrs['base_dn'])) {
+ $base_dn = $attrs['base_dn'];
+ unset($attrs['base_dn']);
+ }
+ else {
+ $base_dn = $this->entry_base_dn('ou', $typeid);
+ }
// TODO: The rdn is configurable as well.
// Use [$type_str . "_"]ou_rdn_attr