From 2a8ac19a13e682bd1e52b2364702414031f36767 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 4 Mar 2014 14:43:24 +0100 Subject: Add support for organizational unit hierarchy --- lib/Auth/LDAP.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/Auth/LDAP.php') 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 -- cgit v1.1