From d7fc5f46a8b6faec4ec0c18089d94d21e505c36c Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 14 Feb 2015 19:13:26 +0100 Subject: Use assoc array for service/user/apikeys Signed-off-by: Florian Pritz --- application/service/user.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'application/service') diff --git a/application/service/user.php b/application/service/user.php index 16fa62272..cab14dbab 100644 --- a/application/service/user.php +++ b/application/service/user.php @@ -53,6 +53,7 @@ class user { static public function apikeys($userid) { $CI =& get_instance(); + $ret = array(); $query = $CI->db->select('key, created, comment, access_level') ->from('apikeys') @@ -66,9 +67,12 @@ class user { if (!empty($record['created'])) { $record['created'] = strtotime($record['created']); } + $ret[$record["key"]] = $record; } unset($record); - return $query; + return array( + "apikeys" => $ret, + ); } } -- cgit v1.2.3-24-g4f1b