$twitter_user['protected'] = false; # not supported by StatusNet yet
$twitter_user['followers_count'] = $profile->subscriberCount();
- $design = null;
$user = $profile->getUser();
+ $design = null;
// Note: some profiles don't have an associated user
+ $defaultDesign = Design::siteDesign();
+
if (!empty($user)) {
$design = $user->getDesign();
}
- if (empty($design)) {
- $design = Design::siteDesign();
- }
-
$color = Design::toWebColor(empty($design->backgroundcolor) ? $defaultDesign->backgroundcolor : $design->backgroundcolor);
$twitter_user['profile_background_color'] = ($color == null) ? '' : '#'.$color->hexValue();
$color = Design::toWebColor(empty($design->textcolor) ? $defaultDesign->textcolor : $design->textcolor);
$timezone = 'UTC';
- if ($user->timezone) {
+ if (!empty($user) && !empty($user->timezone)) {
$timezone = $user->timezone;
}