From 35c4a7940a8868e111f09b5a4f873c1e3d44326f Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 19 Dec 2017 01:31:32 +0100 Subject: [PATCH] Use dba::select() instead of dba::p() in api_get_user --- include/api.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/api.php b/include/api.php index 7a2d411a8d..3a5247e019 100644 --- a/include/api.php +++ b/include/api.php @@ -782,11 +782,7 @@ function api_get_user(App $a, $contact_id = null) // If this is a local user and it uses Frio, we can get its color preferences. if ($ret['self']) { - $r = dba::p( - "select theme from user where uid = ? limit 1", - $ret['uid'] - ); - $theme_info = $r->fetch(); + $theme_info = dba::select('user', ['theme'], ['uid' => $ret['uid']], ['limit' => 1]); if ($theme_info['theme'] === 'frio') { $schema = PConfig::get($ret['uid'], 'frio', 'schema'); if (($schema) && ($schema != '---')) { -- 2.39.5