Edit
I did not understand that you wanted to make a general modification of the user profile tabs, without necessarily deleting them. I modified my code to provide several different examples of how you can change tabs.
Edit 2
The user_access() check for unset has been user_access() , since it will be checked only when the menu is recreated. Added access callback example.
You can do this in a custom module with hook_menu_alter() and unset() :
function mymodule_menu_alter(&$items) { // If you have the Devel module installed, uncomment to retrieve list // of registered menu items to figure out what to unset. // kpr($items); // Change the name of the Edit tab $items['user/%user_category/edit']['title'] = t('Awesome edit!'); // Disable the user edit tab, but don't disable the page if you go navigate // directly to it // @see http://api.drupal.org/api/function/hook_menu/6 for other types $items['user/%user_category/edit']['type'] = MENU_CALLBACK; // Only allow people with administer site configuration permissions to // access the user edit and user edit account tabs. $items['user/%user_category/edit']['access callback'] = 'user_access'; $items['user/%user_category/edit']['access arguments'] = array('administer site configuration'); $items['user/%user_category/edit/account']['access callback'] = 'user_access'; $items['user/%user_category/edit/account']['access arguments'] = array('administer site configuration'); // Completely disable the user edit tab, even if you go directly to it // This affects all users, including user 1. unset($items['user/%user_category/edit']); unset($items['user/%user_category/edit/account']); }
Each menu item is registered in Drupal with an array of $items . After enabling this module, you need to rebuild the cache and the tabs must be changed.
user113292
source share