summaryrefslogtreecommitdiff
path: root/lib/accountsettingsaction.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-11-10 06:44:53 -0800
committerBrion Vibber <brion@pobox.com>2009-11-10 06:44:53 -0800
commit333c376c955fd2513ea168d712223f033db73356 (patch)
tree371f4e8399aa0ea44f2d30ae11d7d777ed812ee9 /lib/accountsettingsaction.php
parent088081675fb7d5250a9b9dfe5015de0822cb5ac2 (diff)
parent069d3f2b2f912f2e7d2289bc58270341c9b1ecc5 (diff)
Merge remote branch 'statusnet/0.9.x' into 0.9.x
Diffstat (limited to 'lib/accountsettingsaction.php')
-rw-r--r--lib/accountsettingsaction.php35
1 files changed, 20 insertions, 15 deletions
diff --git a/lib/accountsettingsaction.php b/lib/accountsettingsaction.php
index a004a3ed9..9865e1748 100644
--- a/lib/accountsettingsaction.php
+++ b/lib/accountsettingsaction.php
@@ -102,26 +102,31 @@ class AccountSettingsNav extends Widget
$this->action->elementStart('ul', array('class' => 'nav'));
if (Event::handle('StartAccountSettingsNav', array(&$this->action))) {
+ $user = common_current_user();
- $menu =
- array('profilesettings' =>
+ $menu = array();
+ $menu['profilesettings'] =
array(_('Profile'),
- _('Change your profile settings')),
- 'avatarsettings' =>
- array(_('Avatar'),
- _('Upload an avatar')),
- 'passwordsettings' =>
- array(_('Password'),
- _('Change your password')),
- 'emailsettings' =>
+ _('Change your profile settings'));
+ if(Event::handle('CanUserChangeField', array($user->nickname, 'avatar'))){
+ $menu['avatarsettings'] =
+ array(_('Avatar'),
+ _('Upload an avatar'));
+ }
+ if(Event::handle('CanUserChangeField', array($user->nickname, 'password'))){
+ $menu['passwordsettings'] =
+ array(_('Password'),
+ _('Change your password'));
+ }
+ $menu['emailsettings'] =
array(_('Email'),
- _('Change email handling')),
- 'userdesignsettings' =>
+ _('Change email handling'));
+ $menu['userdesignsettings'] =
array(_('Design'),
- _('Design your profile')),
- 'othersettings' =>
+ _('Design your profile'));
+ $menu['othersettings'] =
array(_('Other'),
- _('Other options')));
+ _('Other options'));
foreach ($menu as $menuaction => $menudesc) {
$this->action->menuItem(common_local_url($menuaction),