Remove an item from "menu local task" I need to remove "Create new account" from the tabs on /user page.

I was suggested to use hook_menu, but:


It seems that hook_menu can only add, not remove items.
hook_menu does not work for me as I described in Why my hook_menu does not work?


Further: I've found that there is also hook_menu_alter hook. But it does not work for me also. I created the following function for testing:

function cleanetica_advanced_menu_alter(&$items) {
    $items['user'] = array(
       'title' => 'blogs',
       'description' => 'Listing of blogs.',
       #'page callback' => 'blog_page',
       'access arguments' => array('access content'),
       'type' => MENU_DEFAULT_LOCAL_TASK
     );
    //$items = array();
}

I see no changes in /user page after I have added this function into the module,
If you need the registration feature and you need to just remove the link from the default tab, then use menu_alter hook.

function modulename_menu_alter(&amp;$item) {
// Hide the "Create new account" tab
$item['user/register']['type'] = MENU_CALLBACK;
}