You are here

function me_menu in me aliases 6

Same name and namespace in other branches
  1. 8 me.module \me_menu()
  2. 5 me.module \me_menu()
  3. 6.2 me.module \me_menu()
  4. 7 me.module \me_menu()

Implementation of hook_menu().

File

./me.module, line 510
Provides 'me' aliases to allow users to enter 'me' in common paths instead of their user id.

Code

function me_menu() {
  $items = array();
  $items['admin/settings/me'] = array(
    'title' => "'Me' Aliases",
    'description' => "Configure the 'me' aliases, and how they're matched.",
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'me_admin_settings_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_NORMAL_ITEM,
  );

  // TODO: Remove when/if http://drupal.org/node/109588 gets in.
  // We don't need this here if we are doing redirects.
  if (!me_variable_get('me_redirect')) {
    $items['user/' . me_variable_get('me_alias') . '/edit'] = array(
      'title' => 'Edit',
      'page callback' => 'me_user_edit',
      'access callback' => 'me_user_edit_access',
      'type' => MENU_LOCAL_TASK,
    );
  }
  return $items;
}