Use dba::select() instead of dba::p() in api_get_user

This commit is contained in:
Pierre Rudloff 2017-12-19 01:31:32 +01:00
parent 3e9bc61bbf
commit 35c4a7940a

View 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 this is a local user and it uses Frio, we can get its color preferences.
if ($ret['self']) { if ($ret['self']) {
$r = dba::p( $theme_info = dba::select('user', ['theme'], ['uid' => $ret['uid']], ['limit' => 1]);
"select theme from user where uid = ? limit 1",
$ret['uid']
);
$theme_info = $r->fetch();
if ($theme_info['theme'] === 'frio') { if ($theme_info['theme'] === 'frio') {
$schema = PConfig::get($ret['uid'], 'frio', 'schema'); $schema = PConfig::get($ret['uid'], 'frio', 'schema');
if (($schema) && ($schema != '---')) { if (($schema) && ($schema != '---')) {