hide silenced users' profile pages
This commit is contained in:
parent
a4bf33d6b5
commit
fc713b660b
@ -86,6 +86,13 @@ class ProfileAction extends Action
|
|||||||
return false;
|
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->tag = $this->trimmed('tag');
|
||||||
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
|
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
|
||||||
common_set_returnto($this->selfUrl());
|
common_set_returnto($this->selfUrl());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user