-
- $ret = [
- 'id' => intval($pcontact_id),
- 'id_str' => (string) intval($pcontact_id),
- 'name' => (($uinfo[0]['name']) ? $uinfo[0]['name'] : $uinfo[0]['nick']),
- 'screen_name' => (($uinfo[0]['nick']) ? $uinfo[0]['nick'] : $uinfo[0]['name']),
- 'location' => $location,
- 'description' => BBCode::toPlaintext($description ?? ''),
- 'profile_image_url' => $uinfo[0]['micro'],
- 'profile_image_url_https' => $uinfo[0]['micro'],
- 'profile_image_url_profile_size' => $uinfo[0]["thumb"],
- 'profile_image_url_large' => $uinfo[0]["photo"],
- 'url' => $uinfo[0]['url'],
- 'protected' => false,
- 'followers_count' => intval($countfollowers),
- 'friends_count' => intval($countfriends),
- 'listed_count' => 0,
- 'created_at' => api_date($uinfo[0]['created']),
- 'favourites_count' => intval($starred),
- 'utc_offset' => "0",
- 'time_zone' => 'UTC',
- 'geo_enabled' => false,
- 'verified' => true,
- 'statuses_count' => intval($countitems),
- 'lang' => '',
- 'contributors_enabled' => false,
- 'is_translator' => false,
- 'is_translation_enabled' => false,
- 'following' => (($uinfo[0]['rel'] == Contact::FOLLOWER) || ($uinfo[0]['rel'] == Contact::FRIEND)),
- 'follow_request_sent' => false,
- 'statusnet_blocking' => false,
- 'notifications' => false,
- /// @TODO old way?
- //'statusnet_profile_url' => DI::baseUrl()."/contact/".$uinfo[0]['cid'],
- 'statusnet_profile_url' => $uinfo[0]['url'],
- 'uid' => intval($uinfo[0]['uid']),
- 'cid' => intval($uinfo[0]['cid']),
- 'pid' => Contact::getIdForURL($uinfo[0]["url"], 0, false),
- 'self' => $uinfo[0]['self'],
- 'network' => $uinfo[0]['network'],
- ];
-
- // If this is a local user and it uses Frio, we can get its color preferences.
- if ($ret['self']) {
- $theme_info = DBA::selectFirst('user', ['theme'], ['uid' => $ret['uid']]);
- if ($theme_info['theme'] === 'frio') {
- $schema = DI::pConfig()->get($ret['uid'], 'frio', 'schema');
-
- if ($schema && ($schema != '---')) {
- if (file_exists('view/theme/frio/schema/'.$schema.'.php')) {
- $schemefile = 'view/theme/frio/schema/'.$schema.'.php';
- require_once $schemefile;
- }
- } else {
- $nav_bg = DI::pConfig()->get($ret['uid'], 'frio', 'nav_bg');
- $link_color = DI::pConfig()->get($ret['uid'], 'frio', 'link_color');
- $bgcolor = DI::pConfig()->get($ret['uid'], 'frio', 'background_color');
- }
- if (empty($nav_bg)) {
- $nav_bg = "#708fa0";
- }
- if (empty($link_color)) {
- $link_color = "#6fdbe8";
- }
- if (empty($bgcolor)) {
- $bgcolor = "#ededed";
- }
-
- $ret['profile_sidebar_fill_color'] = str_replace('#', '', $nav_bg);
- $ret['profile_link_color'] = str_replace('#', '', $link_color);
- $ret['profile_background_color'] = str_replace('#', '', $bgcolor);
- }
- }
-
- return $ret;