summaryrefslogtreecommitdiffstats
path: root/lib/api/kolab_api_service_user.php
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2012-03-30 13:26:32 +0200
committerAleksander Machniak <machniak@kolabsys.com>2012-03-30 13:26:32 +0200
commit7906fe64d5b76d6abec033ade2d3e9fa56d9abd8 (patch)
tree9b0dbf6d00f497eb3726b79705394cdef12300c7 /lib/api/kolab_api_service_user.php
parentfe39a1887ffe4425b88613eeb384971f838103f3 (diff)
downloadwebadmin-7906fe64d5b76d6abec033ade2d3e9fa56d9abd8.tar.gz
Unified some methods: Use object_type_*() instead of separate user_type_*/group_type_*/<any>_type_*.
Unified some API calls arguments: Use object_name and type_id instead of user_type_id/group_type_id/<any>_type_id.
Diffstat (limited to 'lib/api/kolab_api_service_user.php')
-rw-r--r--lib/api/kolab_api_service_user.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/kolab_api_service_user.php b/lib/api/kolab_api_service_user.php
index fea9f9d..855518f 100644
--- a/lib/api/kolab_api_service_user.php
+++ b/lib/api/kolab_api_service_user.php
@@ -59,7 +59,7 @@ class kolab_api_service_user extends kolab_api_service
*/
public function user_add($getdata, $postdata)
{
- $uta = $this->user_type_attributes($postdata['user_type_id']);
+ $uta = $this->object_type_attributes('user', $postdata['type_id']);
$form_service = $this->controller->get_service('form_value');
$user_attributes = array();
@@ -96,7 +96,7 @@ class kolab_api_service_user extends kolab_api_service
}
$auth = Auth::get_instance();
- $result = $auth->user_add($user_attributes, $postdata['user_type_id']);
+ $result = $auth->user_add($user_attributes, $postdata['type_id']);
if ($result) {
return $user_attributes;
@@ -154,12 +154,12 @@ class kolab_api_service_user extends kolab_api_service
$result['entrydn'] = $dn;
// add user type id to the result
- $result['user_type_id'] = $this->object_type_id('user', $result['objectclass']);
+ $result['type_id'] = $this->object_type_id('user', $result['objectclass']);
// Search for attributes associated with the type_id that are not part
// of the results returned earlier. Example: nsrole / nsroledn / aci, etc.
- if ($result['user_type_id']) {
- $uta = $this->user_type_attributes($result['user_type_id']);
+ if ($result['type_id']) {
+ $uta = $this->object_type_attributes('user', $result['type_id']);
$attrs = array();
foreach ($uta as $field_type => $attributes) {