Move user profiles under a menu item In Drupal 7, currently when I go to a user profile, the breadcrumbs go as follows: "Home > username."
I have a People section as part of my main navigation, so I would like the breadcrumbs to behave more like: "Home > People > username."

How can this be accomplished?
There are two possibilities: You can implement a hook in a module, or implement a theme function in the theme you are currently using.

Module

In Drupal 7, you can implement hook_menu_breadcrumb_alter(). The hook implementation receives the current breadcrumb array by reference, and the menu item for the currently visualized page. The example provided in the documentation page is the following one:

function hook_menu_breadcrumb_alter(&amp;$active_trail, $item) {
  // Always display a link to the current page by duplicating the last link in
  // the active trail. This means that menu_get_active_breadcrumb() will remove
  // the last link (for the current page), but since it is added once more here,
  // it will appear.
  if (!drupal_is_front_page()) {
    $end = end($active_trail);
    if ($item['href'] == $end['href']) {
      $active_trail[] = $end;
    }
  }
}


An example of implementation of such hook could be the following one ("mymodule" needs to be replaced with the short name of the module that contains the hook):

function mymodule_menu_breadcrumb_alter(&amp;$active_trail, $item) {
  if (substr($item['href'], 0, 4) == 'user') {
    // Add a trail item before the one linking to the user profile page.
  }
}


For a method that can be used on Drupal 6 too (when you want to develop code that is for both Drupal 6 and Drupal 7, and you don't want to write code for each Drupal version), you can use drupal_set_breadcrumb() to set the breadcrumb for the user profile pages.

An example of how the function can be called is the following Drupal function:

function blog_view($node, $view_mode) {
  if ($view_mode == 'full' &amp;&amp; node_is_page($node)) {
    // Breadcrumb navigation.  l() escapes title, so we should not escape !name.
    drupal_set_breadcrumb(array(l(t('Home'), NULL), l(t('Blogs'), 'blog'), l(t("!name's blog", array('!name' =&gt; format_username($node))), 'blog/' . $node-&gt;uid)));
  }
  return $node;
}


You could alter the menu callback for the menu items associated with the user profiles, and use a menu callback that first sets the breadcrumb, and then calls the original menu callback. The hook to implement in this case is hook_menu_alter().

Theme

As far as I recall, a theme can also implement some alter hooks as a module does; alternatively, a theme just overrides a theme function ("mytheme" needs to be replaced with the short name of the theme).

function mytheme_breadcrumb($variables) {
    $breadcrumb = $variables['breadcrumb'];

    // Modify the breadcrumb.
}


The variable $breadcrumb is an array containing the HTML for the single parts of the breadcrumb.
The default implementation of the theme function is the following one:

function theme_breadcrumb($variables) {
  $breadcrumb = $variables['breadcrumb'];

  if (!empty($breadcrumb)) {
    // Provide a navigational heading to give context for breadcrumb links to
    // screen-reader users. Make the heading invisible with .element-invisible.
    $output = '&lt;h2 class="element-invisible"&gt;' . t('You are here') . '&lt;/h2&gt;';

    $output .= '&lt;div class="breadcrumb"&gt;' . implode(' » ', $breadcrumb) . '&lt;/div&gt;';
    return $output;
  }
}


Between the two possible implementations, I would rather use a module, as it doesn't depend from the currently set theme; the theme can be changed, and the code would still change the breadcrumb. Generally, the code of a theme should alter the way elements are rendered, not to change the breadcrumb to alter the links it contains.