diff options
author | Brion Vibber <brion@pobox.com> | 2010-11-15 16:12:16 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-11-15 16:12:16 -0800 |
commit | 5fdcba472b8673380248ab0d5dce45967f774caa (patch) | |
tree | 65945eb73772a2b7c2e455fe1a2a5b5c5cb7f5b5 /lib | |
parent | 88c35c2ccea5edcd08708f30247dc51a7473ecce (diff) |
RemoteProfileAction cleanup:
- meta robots to prevent spidering
- a little notice if silenced
Diffstat (limited to 'lib')
-rw-r--r-- | lib/userprofile.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/userprofile.php b/lib/userprofile.php index 9124b7c94..2813f735e 100644 --- a/lib/userprofile.php +++ b/lib/userprofile.php @@ -321,6 +321,9 @@ class UserProfile extends Widget } $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)) { @@ -351,7 +354,7 @@ class UserProfile extends Widget $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(); @@ -361,7 +364,7 @@ class UserProfile extends Widget $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'); |