}
$this->out->elementEnd('li');
+ // Some actions won't be applicable to non-local users.
+ $isLocal = !empty($this->user);
+
if ($cur->hasRight(Right::SANDBOXUSER) ||
$cur->hasRight(Right::SILENCEUSER) ||
$cur->hasRight(Right::DELETEUSER)) {
$this->out->elementEnd('li');
}
- if ($cur->hasRight(Right::DELETEUSER)) {
+ if ($isLocal && $cur->hasRight(Right::DELETEUSER)) {
$this->out->elementStart('li', 'entity_delete');
$df = new DeleteUserForm($this->out, $this->profile, $r2args);
$df->show();
$this->out->elementEnd('li');
}
- if ($cur->hasRight(Right::GRANTROLE)) {
+ if ($isLocal && $cur->hasRight(Right::GRANTROLE)) {
$this->out->elementStart('li', 'entity_role');
$this->out->element('p', null, _('User role'));
$this->out->elementStart('ul');
$url);
$html = common_markup_to_html($markdown);
$this->raw($html);
+
+ if ($this->profile->hasRole(Profile_role::SILENCED)) {
+ $markdown = _m('Site moderators have silenced this profile, which prevents delivery of new messages to any users on this site.');
+ $this->raw(common_markup_to_html($markdown));
+ }
}
function getFeeds()
// none
}
+ /**
+ * Don't do various extra stuff, and also trim some things to avoid crawlers.
+ */
function extraHead()
{
- // none
+ $this->element('meta', array('name' => 'robots',
+ 'content' => 'noindex,nofollow'));
}
function showLocalNav()