Commit fc713b66 authored by Evan Prodromou's avatar Evan Prodromou

hide silenced users' profile pages

parent a4bf33d6
......@@ -86,6 +86,13 @@ class ProfileAction extends Action
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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment