summaryrefslogtreecommitdiffstats
path: root/lib/api/kolab_api_service_user_types.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/kolab_api_service_user_types.php')
-rw-r--r--lib/api/kolab_api_service_user_types.php18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/api/kolab_api_service_user_types.php b/lib/api/kolab_api_service_user_types.php
index 1c5a6c4..164e872 100644
--- a/lib/api/kolab_api_service_user_types.php
+++ b/lib/api/kolab_api_service_user_types.php
@@ -37,23 +37,7 @@ class kolab_api_service_user_types extends kolab_api_service
public function user_types_list($get, $post)
{
- $sql_result = $this->db->query("SELECT * FROM user_types");
- $user_types = array();
-
- while ($row = $this->db->fetch_assoc($sql_result)) {
- $user_types[$row['id']] = array();
-
- foreach ($row as $key => $value) {
- if ($key != "id") {
- if ($key == "attributes") {
- $user_types[$row['id']][$key] = json_decode(unserialize($value), true);
- }
- else {
- $user_types[$row['id']][$key] = $value;
- }
- }
- }
- }
+ $user_types = $this->user_types();
return array(
'list' => $user_types,