summaryrefslogtreecommitdiffstats
path: root/lib/api/kolab_api_service_user.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-02-20 12:29:50 +0100
committerAleksander Machniak <alec@alec.pl>2012-02-20 12:29:50 +0100
commit47b4ba7f0750db379c7e07ba489aeaea8380444d (patch)
tree8ca2c969960b1477d5d8e784cff9652f2cf3c3d4 /lib/api/kolab_api_service_user.php
parentfe489152f2199f6a6862529cf1c9cde2b50437e6 (diff)
downloadwebadmin-47b4ba7f0750db379c7e07ba489aeaea8380444d.tar.gz
Simplified code with user_type_attributes() method
Diffstat (limited to 'lib/api/kolab_api_service_user.php')
-rw-r--r--lib/api/kolab_api_service_user.php9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/api/kolab_api_service_user.php b/lib/api/kolab_api_service_user.php
index b8d46a2..e6c4049 100644
--- a/lib/api/kolab_api_service_user.php
+++ b/lib/api/kolab_api_service_user.php
@@ -21,14 +21,7 @@ class kolab_api_service_user extends kolab_api_service
public function user_add($getdata, $postdata)
{
- if (!isset($postdata['user_type_id'])) {
- throw new Exception($this->controller->translate('user.notypeid'), 346781);
- }
-
- $sql_result = $this->db->query("SELECT attributes FROM user_types WHERE id = ?", $postdata['user_type_id']);
- $user_type = $this->db->fetch_assoc($sql_result);
-
- $uta = json_decode(unserialize($user_type['attributes']), true);
+ $uta = $this->user_type_attributes($postdata['user_type_id']);
$user_attributes = array();