You are here

function bakery_menu_alter in Bakery Single Sign-On System 6

Same name and namespace in other branches
  1. 7.2 bakery.module \bakery_menu_alter()

Implementation of hook_menu_alter().

File

./bakery.module, line 46

Code

function bakery_menu_alter(&$callbacks) {
  if (!variable_get('bakery_is_master', 0)) {
    unset($callbacks['user/login'], $callbacks['user/password'], $callbacks['user/reset/%/%/%']);

    // Registration and login pages.
    $callbacks['user'] = array(
      'title' => 'User account',
      'page callback' => 'bakery_user_page',
      'access callback' => 'user_is_logged_in',
      'type' => MENU_CALLBACK,
    );
    $callbacks['user/register'] = array(
      'title' => 'Register',
      'page callback' => 'bakery_user_page',
      'access callback' => 'user_is_logged_in',
      'type' => MENU_CALLBACK,
    );
  }
}