summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/user/user.module22
1 files changed, 15 insertions, 7 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 418a451e5..b277d1f39 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -972,16 +972,24 @@ function user_menu() {
'type' => MENU_LOCAL_TASK,
);
+ $items['user/%user/edit/account'] = array(
+ 'title' => 'Account',
+ 'type' => MENU_DEFAULT_LOCAL_TASK,
+ );
+
$empty_account = new stdClass();
if (($categories = _user_categories($empty_account)) && (count($categories) > 1)) {
foreach ($categories as $key => $category) {
- $items['user/%user/edit/'. $category['name']] = array(
- 'title callback' => 'check_plain',
- 'title arguments' => array($category['title']),
- 'page arguments' => array('user_edit', 3),
- 'type' => $category['name'] == 'account' ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
- 'weight' => $category['weight'],
- );
+ // 'account' is already handled by the MENU_DEFAULT_LOCAL_TASK.
+ if ($category['name'] != 'account') {
+ $items['user/%user/edit/'. $category['name']] = array(
+ 'title callback' => 'check_plain',
+ 'title arguments' => array($category['title']),
+ 'page arguments' => array('user_edit', 3),
+ 'type' => MENU_LOCAL_TASK,
+ 'weight' => $category['weight'],
+ );
+ }
}
}
return $items;