function user_menu_title

Menu item title callback for the 'user' path.

Anonymous users should see a title based on the requested page, but authenticated users are expected to see "My account".

1 string reference to 'user_menu_title'
user_menu in drupal/core/modules/user/user.module
Implements hook_menu().

File

drupal/core/modules/user/user.module, line 1389
Enables the user registration and login system.

Code

function user_menu_title() {
  if (!user_is_logged_in()) {
    switch (current_path()) {
      case 'user':
      case 'user/login':
        return t('Log in');
      case 'user/register':
        return t('Create new account');
      case 'user/password':
        return t('Request new password');
      default:
        return t('User account');
    }
  }
  else {
    return t('My account');
  }
}