return false;
}
- $this->user = User::staticGet('nickname', $nickname);
+ $this->user = User::getKV('nickname', $nickname);
if (!$this->user) {
// TRANS: Client error displayed when calling a profile action without specifying a user.
return false;
}
+ $user = common_current_user();
+
+ if ($this->profile->hasRole(Profile_role::SILENCED) &&
+ (empty($user) || !$user->hasRight(Right::SILENCEUSER))) {
+ throw new ClientException(_('This profile has been silenced by site moderators'), 403);
+ }
+
$this->tag = $this->trimmed('tag');
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
common_set_returnto($this->selfUrl());
function showSubscriptions()
{
- $profile = $this->profile->getSubscriptions(0, PROFILES_PER_MINILIST + 1);
+ $profile = $this->profile->getSubscribed(0, PROFILES_PER_MINILIST + 1);
$this->elementStart('div', array('id' => 'entity_subscriptions',
'class' => 'section'));
// TRANS: H2 text for user group membership statistics.
$this->statsSectionLink('usergroups', _('Groups'));
$this->text(' ');
- $this->text($this->profile->getGroups()->N);
+ $this->text($this->profile->getGroups(0, null)->N);
$this->elementEnd('h2');
if ($groups) {