summaryrefslogtreecommitdiffstats
path: root/lib/api/kolab_api_service_ou.php
diff options
context:
space:
mode:
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;
}