function get_image() {
$user = $this->user;
$profile = $user->getProfile();
+ if (!$profile) {
+ return NULL;
+ }
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
return ($avatar) ? $avatar->url : NULL;
}
$profile = $notice->getProfile();
if (!$profile) {
common_log_db_error($notice, 'SELECT', __FILE__);
+ $this->server_error(_('Notice without matching profile'));
return;
}
# XXX: RDFa
$user = common_current_user();
$profile = $user->getProfile();
+ if (!$profile) {
+ common_log_db_error($user, 'SELECT', __FILE__);
+ $this->server_error(_('User without matching profile'));
+ return;
+ }
+
$original = $profile->getOriginalAvatar();
$req->set_parameter('omb_listenee_profile', common_profile_url($user->nickname));
$req->set_parameter('omb_listenee_nickname', $user->nickname);
$req->set_parameter('omb_listenee_license', $config['license']['url']);
+
$profile = $user->getProfile();
+ if (!$profile) {
+ common_log_db_error($user, 'SELECT', __FILE__);
+ $this->server_error(_('User without matching profile'));
+ return;
+ }
+
if ($profile->fullname) {
$req->set_parameter('omb_listenee_fullname', $profile->fullname);
}
function get_image() {
$user = $this->user;
$profile = $user->getProfile();
+ if (!$profile) {
+ return NULL;
+ }
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
return ($avatar) ? $avatar->url : NULL;
}
$other = Profile::staticGet($subs->subscribed);
+ if (!$other) {
+ common_log_db_error($subs, 'SELECT', __FILE__);
+ continue;
+ }
+
common_element_start('li');
common_element_start('a', array('title' => ($other->fullname) ?
$other->fullname :
$params['omb_version'] = OMB_VERSION_01;
$user = User::staticGet('uri', $req->get_parameter('omb_listener'));
$profile = $user->getProfile();
+ if (!$profile) {
+ common_log_db_error($user, 'SELECT', __FILE__);
+ $this->server_error(_('User without matching profile'));
+ return;
+ }
$params['omb_listener_nickname'] = $user->nickname;
$params['omb_listener_profile'] = common_local_url('showstream',
array('nickname' => $user->nickname));
function get_image() {
$user = $this->user;
$profile = $user->getProfile();
+ if (!$profile) {
+ common_log_db_error($user, 'SELECT', __FILE__);
+ $this->server_error(_('User without matching profile'));
+ return NULL;
+ }
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
return ($avatar) ? $avatar->url : NULL;
}