summaryrefslogtreecommitdiffstats
path: root/lib/api/kolab_api_service_ou.php
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/api/kolab_api_service_ou.php
parent8e09ba6962f63bfcb0dcd6eee92250b352bec895 (diff)
downloadwebadmin-2a8ac19a13e682bd1e52b2364702414031f36767.tar.gz
Add support for organizational unit hierarchy
Diffstat (limited to 'lib/api/kolab_api_service_ou.php')
-rw-r--r--lib/api/kolab_api_service_ou.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/api/kolab_api_service_ou.php b/lib/api/kolab_api_service_ou.php
index 015d736..7e9eddc 100644
--- a/lib/api/kolab_api_service_ou.php
+++ b/lib/api/kolab_api_service_ou.php
@@ -167,9 +167,15 @@ class kolab_api_service_ou extends kolab_api_service
$result = $auth->organizationalunit_info($getdata['id']);
// normalize result
- $result = $this->parse_result_attributes('ou', $result);
+ $result = $this->parse_result_attributes('ou', $result, $dn);
if ($result) {
+ // get base_dn "attribute" for the API client
+ $dn = substr($dn, strlen($result['ou']) + 4);
+ if (strpos($dn, 'ou=') === 0) {
+ $result['base_dn'] = $dn;
+ }
+
return $result;
}