Why does the title callback of /user produce the title for /user/register? I'm a bit puzzled why the title callback of /user produces the title for /user/register and /user/password.

When I set the title callback of /user, I see this affects the title of /user/register and /user/password. However, setting a title callback for /user/register seems to make no difference; it appears to stick to the title callback of /user.

What is special about /user/register and /user/password which results in titles for these callbacks to have their titles produced by the title callback of /user?

function mytheme_menu_alter(&amp;$items) {
  $items['user']['title callback'] = 'mytheme_user_title';
}

function mytheme_user_title($title) {
  return 'test';
}
For the user/register title to be changed in a theme:

function mytheme_preprocess_page(&amp;$variables) {
  // Only act when the first part of the url equals 'user', the second
  // part is 'register'
  $arg = arg();
  if ($arg[0] == 'user' &amp;&amp; $arg[1] == 'register') {
    $variables['title'] = 'Test';
  }
}


For the user/register title to be changed in a module:

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'user_register_form') {
  drupal_set_title(t('Test'));
  }
}


Hope that helps.