summaryrefslogtreecommitdiffstats
path: root/lib/api/kolab_api_service_user.php
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-03-31 01:30:37 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-03-31 01:30:37 +0200
commita228de1f80379cc29b58bf2673fd4e3d56e953cd (patch)
tree68e3e4062eeea84b7abfea347a2fb98849d5ccc2 /lib/api/kolab_api_service_user.php
parent8c9e624ba04739bdd723a86e5eed051287e0018d (diff)
downloadwebadmin-a228de1f80379cc29b58bf2673fd4e3d56e953cd.tar.gz
Take a stab at making groups editable (and users, ultimately)
Diffstat (limited to 'lib/api/kolab_api_service_user.php')
-rw-r--r--lib/api/kolab_api_service_user.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/api/kolab_api_service_user.php b/lib/api/kolab_api_service_user.php
index 855518f..111456e 100644
--- a/lib/api/kolab_api_service_user.php
+++ b/lib/api/kolab_api_service_user.php
@@ -145,6 +145,7 @@ class kolab_api_service_user extends kolab_api_service
}
$auth = Auth::get_instance();
+ $conf = Conf::get_instance();
$user = $getdata['user'];
$result = $auth->user_info($user);
@@ -170,6 +171,16 @@ class kolab_api_service_user extends kolab_api_service
}
}
+ // Insert the persistent, unique attribute
+ $unique_attr = $conf->get('unique_attr');
+ if (!$unique_attr) {
+ $unique_attr = 'nsuniqueid';
+ }
+
+ if (!array_key_exists($unique_attr, $attrs)) {
+ $attrs[] = 'nsuniqueid';
+ }
+
if (!empty($attrs)) {
$attrs = $auth->user_attributes($result['entrydn'], $attrs);
if (!empty($attrs)) {