]> git.mxchange.org Git - friendica.git/commitdiff
Use dba::select() instead of dba::p() in api_get_user
authorPierre Rudloff <contact@rudloff.pro>
Tue, 19 Dec 2017 00:31:32 +0000 (01:31 +0100)
committerPierre Rudloff <contact@rudloff.pro>
Tue, 19 Dec 2017 00:31:32 +0000 (01:31 +0100)
include/api.php

index 7a2d411a8d74ee77b724762ff933e0ee1b951057..3a5247e019b8e8fe4da19476bc78b61fd4287fd9 100644 (file)
@@ -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 != '---')) {