Skip to content

Instantly share code, notes, and snippets.

@danreb
Created October 8, 2012 03:13
Show Gist options
  • Save danreb/3850525 to your computer and use it in GitHub Desktop.
Save danreb/3850525 to your computer and use it in GitHub Desktop.
Remove Login Tab
This will just remove log-in tab for customizing in theme, use this together with the code found in https://gist.github.com/3850448
name = My Custom Module
description = Remove tabs on Log-in / Create Account / Request Password pages.
core = 7.x
package = Custom
files[] = mymodule.module
<?php
/**
* Implementation of hook_menu_alter().
* Remember to clear the menu cache after adding/editing this function.
*/
function mymodule_menu_alter(&$items) {
/*
* Removing user log-in tabs, note the pages themselves are still available to link to
* Set these tabs to MENU_CALLBACK, so they still register the path, but just don't show the tab:
*/
$items['user']['type'] = MENU_CALLBACK;
$items['user/password']['type'] = MENU_CALLBACK;
$items['user/register']['type'] = MENU_CALLBACK;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment