diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 9b4667e..989eaa1 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1459,7 +1459,7 @@ function drupal_unpack($obj, $field = 'data') {
  * variable text such as user names or link URLs into translated text. Variable
  * substitution looks like this:
  * @code
- * $text = t("@name's blog", array('@name' => format_username($account)));
+ * $text = t("@name's blog", array('@name' => user_format_name($account)));
  * @endcode
  * Basically, you can put variables like @name into your string, and t() will
  * substitute their sanitized values at translation time (see $args below or
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 4229d52..008224e 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -1966,29 +1966,6 @@ function _format_date_callback(array $matches = NULL, $new_langcode = NULL) {
 }
 
 /**
- * Format a username.
- *
- * By default, the passed-in object's 'name' property is used if it exists, or
- * else, the site-defined value for the 'anonymous' variable. However, a module
- * may override this by implementing hook_username_alter(&$name, $account).
- *
- * @see hook_username_alter()
- *
- * @param $account
- *   The account object for the user whose name is to be formatted.
- *
- * @return
- *   An unsanitized string with the username to display. The code receiving
- *   this result must ensure that check_plain() is called on it before it is
- *   printed to the page.
- */
-function format_username($account) {
-  $name = !empty($account->name) ? $account->name : variable_get('anonymous', t('Anonymous'));
-  drupal_alter('username', $name, $account);
-  return $name;
-}
-
-/**
  * @} End of "defgroup format".
  */
 
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 1e45b2a..94d40e5 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2740,7 +2740,7 @@ function template_preprocess_username(&$variables) {
   // unsanitized version, in case other preprocess functions want to implement
   // their own shortening logic or add markup. If they do so, they must ensure
   // that $variables['name'] is safe for printing.
-  $name = $variables['name_raw'] = format_username($account);
+  $name = $variables['name_raw'] = user_format_name($account);
   if (drupal_strlen($name) > 20) {
     $name = drupal_substr($name, 0, 15) . '...';
   }
diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module
index 9388877..b5ef1d3 100644
--- a/core/modules/contact/contact.module
+++ b/core/modules/contact/contact.module
@@ -174,7 +174,7 @@ function contact_mail($key, &$message, $params) {
     '!subject' => $params['subject'],
     '!category' => isset($params['category']['category']) ? $params['category']['category'] : '',
     '!form-url' => url($_GET['q'], array('absolute' => TRUE, 'language' => $language)),
-    '!sender-name' => format_username($params['sender']),
+    '!sender-name' => user_format_name($params['sender']),
     '!sender-url' => $params['sender']->uid ? url('user/' . $params['sender']->uid, array('absolute' => TRUE, 'language' => $language)) : $params['sender']->mail,
   );
 
@@ -194,7 +194,7 @@ function contact_mail($key, &$message, $params) {
     case 'user_mail':
     case 'user_copy':
       $variables += array(
-        '!recipient-name' => format_username($params['recipient']),
+        '!recipient-name' => user_format_name($params['recipient']),
         '!recipient-edit-url' => url('user/' . $params['recipient']->uid . '/edit', array('absolute' => TRUE, 'language' => $language)),
       );
       $message['subject'] .= t('[!site-name] !subject', $variables, array('langcode' => $language->language));
diff --git a/core/modules/contact/contact.pages.inc b/core/modules/contact/contact.pages.inc
index 30b2825..1c093a7 100644
--- a/core/modules/contact/contact.pages.inc
+++ b/core/modules/contact/contact.pages.inc
@@ -65,7 +65,7 @@ function contact_site_form($form, &$form_state) {
     '#type' => 'textfield',
     '#title' => t('Your name'),
     '#maxlength' => 255,
-    '#default_value' => $user->uid ? format_username($user) : '',
+    '#default_value' => $user->uid ? user_format_name($user) : '',
     '#required' => TRUE,
   );
   $form['mail'] = array(
@@ -183,7 +183,7 @@ function contact_personal_form($form, &$form_state, $recipient) {
     drupal_exit();
   }
 
-  drupal_set_title(t('Contact @username', array('@username' => format_username($recipient))), PASS_THROUGH);
+  drupal_set_title(t('Contact @username', array('@username' => user_format_name($recipient))), PASS_THROUGH);
 
   if (!$user->uid) {
     $form['#attached']['library'][] = array('system', 'jquery.cookie');
@@ -199,7 +199,7 @@ function contact_personal_form($form, &$form_state, $recipient) {
     '#type' => 'textfield',
     '#title' => t('Your name'),
     '#maxlength' => 255,
-    '#default_value' => $user->uid ? format_username($user) : '',
+    '#default_value' => $user->uid ? user_format_name($user) : '',
     '#required' => TRUE,
   );
   $form['mail'] = array(
diff --git a/core/modules/file/tests/file.test b/core/modules/file/tests/file.test
index 59f6e0c..2c242fb 100644
--- a/core/modules/file/tests/file.test
+++ b/core/modules/file/tests/file.test
@@ -1070,7 +1070,7 @@ class FileTokenReplaceTestCase extends FileFieldTestCase {
     $tests['[file:url]'] = check_plain(file_create_url($file->uri));
     $tests['[file:timestamp]'] = format_date($file->timestamp, 'medium', '', NULL, $language->language);
     $tests['[file:timestamp:short]'] = format_date($file->timestamp, 'short', '', NULL, $language->language);
-    $tests['[file:owner]'] = check_plain(format_username($this->admin_user));
+    $tests['[file:owner]'] = check_plain(user_format_name($this->admin_user));
     $tests['[file:owner:uid]'] = $file->uid;
 
     // Test to make sure that we generated something for each token.
diff --git a/core/modules/node/node.test b/core/modules/node/node.test
index 817f390..68f2a7c 100644
--- a/core/modules/node/node.test
+++ b/core/modules/node/node.test
@@ -2264,9 +2264,9 @@ class NodeTokenReplaceTestCase extends DrupalWebTestCase {
     $tests['[node:language]'] = check_plain($node->language);
     $tests['[node:url]'] = url('node/' . $node->nid, $url_options);
     $tests['[node:edit-url]'] = url('node/' . $node->nid . '/edit', $url_options);
-    $tests['[node:author]'] = check_plain(format_username($account));
+    $tests['[node:author]'] = check_plain(user_format_name($account));
     $tests['[node:author:uid]'] = $node->uid;
-    $tests['[node:author:name]'] = check_plain(format_username($account));
+    $tests['[node:author:name]'] = check_plain(user_format_name($account));
     $tests['[node:created:since]'] = format_interval(REQUEST_TIME - $node->created, 2, $language->language);
     $tests['[node:changed:since]'] = format_interval(REQUEST_TIME - $node->changed, 2, $language->language);
 
@@ -2283,7 +2283,7 @@ class NodeTokenReplaceTestCase extends DrupalWebTestCase {
     $tests['[node:body]'] = $node->body[$node->language][0]['value'];
     $tests['[node:summary]'] = $node->body[$node->language][0]['summary'];
     $tests['[node:language]'] = $node->language;
-    $tests['[node:author:name]'] = format_username($account);
+    $tests['[node:author:name]'] = user_format_name($account);
 
     foreach ($tests as $input => $expected) {
       $output = token_replace($input, array('node' => $node), array('language' => $language, 'sanitize' => FALSE));
diff --git a/core/modules/node/node.tokens.inc b/core/modules/node/node.tokens.inc
index 491ec81..f71143a 100644
--- a/core/modules/node/node.tokens.inc
+++ b/core/modules/node/node.tokens.inc
@@ -158,7 +158,7 @@ function node_tokens($type, $tokens, array $data = array(), array $options = arr
         // Default values for the chained tokens handled below.
         case 'author':
           $account = user_load($node->uid);
-          $name = format_username($account);
+          $name = user_format_name($account);
           $replacements[$original] = $sanitize ? check_plain($name) : $name;
           break;
 
diff --git a/core/modules/openid/openid.pages.inc b/core/modules/openid/openid.pages.inc
index 6e3f096..45094c2 100644
--- a/core/modules/openid/openid.pages.inc
+++ b/core/modules/openid/openid.pages.inc
@@ -27,7 +27,7 @@ function openid_authentication_page() {
  * Menu callback; Manage OpenID identities for the specified user.
  */
 function openid_user_identities($account) {
-  drupal_set_title(format_username($account));
+  drupal_set_title(user_format_name($account));
   drupal_add_css(drupal_get_path('module', 'openid') . '/openid.css');
 
   // Check to see if we got a response
diff --git a/core/modules/php/php.module b/core/modules/php/php.module
index 37bf9a1..b9efe17 100644
--- a/core/modules/php/php.module
+++ b/core/modules/php/php.module
@@ -108,7 +108,7 @@ print t(\'Welcome visitor! Thank you for visiting.\');
 <pre>
 global $user;
 if ($user->uid) {
-  print t(\'Welcome @name! Thank you for visiting.\', array(\'@name\' => format_username($user)));
+  print t(\'Welcome @name! Thank you for visiting.\', array(\'@name\' => user_format_name($user)));
 }
 else {
   print t(\'Welcome visitor! Thank you for visiting.\');
diff --git a/core/modules/statistics/statistics.pages.inc b/core/modules/statistics/statistics.pages.inc
index bb31f98..714b6e4 100644
--- a/core/modules/statistics/statistics.pages.inc
+++ b/core/modules/statistics/statistics.pages.inc
@@ -75,7 +75,7 @@ function statistics_user_tracker() {
         l(t('details'), "admin/reports/access/$log->aid"));
     }
 
-    drupal_set_title(format_username($account));
+    drupal_set_title(user_format_name($account));
     $build['statistics_table'] = array(
       '#theme' => 'table',
       '#header' => $header,
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index ed2a8bf..6f20d38 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -1946,7 +1946,7 @@ function hook_mail($key, &$message, $params) {
   $context = $params['context'];
   $variables = array(
     '%site_name' => variable_get('site_name', 'Drupal'),
-    '%username' => format_username($account),
+    '%username' => user_format_name($account),
   );
   if ($context['hook'] == 'taxonomy') {
     $entity = $params['entity'];
@@ -3678,17 +3678,17 @@ function hook_url_outbound_alter(&$path, &$options, $original_path) {
 /**
  * Alter the username that is displayed for a user.
  *
- * Called by format_username() to allow modules to alter the username that's
+ * Called by user_format_name() to allow modules to alter the username that's
  * displayed. Can be used to ensure user privacy in situations where
  * $account->name is too revealing.
  *
  * @param $name
- *   The string that format_username() will return.
+ *   The string that user_format_name() will return.
  *
  * @param $account
- *   The account object passed to format_username().
+ *   The account object passed to user_format_name().
  *
- * @see format_username()
+ * @see user_format_name()
  */
 function hook_username_alter(&$name, $account) {
   // Display the user's uid instead of name.
diff --git a/core/modules/system/system.tokens.inc b/core/modules/system/system.tokens.inc
index b612d10..8401c15 100644
--- a/core/modules/system/system.tokens.inc
+++ b/core/modules/system/system.tokens.inc
@@ -250,7 +250,7 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a
 
         case 'owner':
           $account = user_load($file->uid);
-          $name = format_username($account);
+          $name = user_format_name($account);
           $replacements[$original] = $sanitize ? check_plain($name) : $name;
           break;
       }
diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module
index d25ca2d..57344c0 100644
--- a/core/modules/toolbar/toolbar.module
+++ b/core/modules/toolbar/toolbar.module
@@ -211,7 +211,7 @@ function toolbar_view() {
   if ($user->uid) {
     $links = array(
       'account' => array(
-        'title' => t('Hello <strong>@username</strong>', array('@username' => format_username($user))),
+        'title' => t('Hello <strong>@username</strong>', array('@username' => user_format_name($user))),
         'href' => 'user',
         'html' => TRUE,
         'attributes' => array('title' => t('User account')),
diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc
index b83adce..38d47c2 100644
--- a/core/modules/tracker/tracker.pages.inc
+++ b/core/modules/tracker/tracker.pages.inc
@@ -18,7 +18,7 @@ function tracker_page($account = NULL, $set_title = FALSE) {
       // When viewed from user/%user/track, display the name of the user
       // as page title -- the tab title remains Track so this needs to be done
       // here and not in the menu definition.
-      drupal_set_title(format_username($account));
+      drupal_set_title(user_format_name($account));
     }
   }
   else {
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index b22d30f..d4c677f 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -180,6 +180,29 @@ function user_uri($user) {
 }
 
 /**
+ * Format a username.
+ *
+ * By default, the passed-in object's 'name' property is used if it exists, or
+ * else, the site-defined value for the 'anonymous' variable. However, a module
+ * may override this by implementing hook_username_alter(&$name, $account).
+ *
+ * @see hook_username_alter()
+ *
+ * @param $account
+ *   The account object for the user whose name is to be formatted.
+ *
+ * @return
+ *   An unsanitized string with the username to display. The code receiving
+ *   this result must ensure that check_plain() is called on it before it is
+ *   printed to the page.
+ */
+function user_format_name($account) {
+  $name = !empty($account->name) ? $account->name : variable_get('anonymous', t('Anonymous'));
+  drupal_alter('username', $name, $account);
+  return $name;
+}
+
+/**
  * Entity label callback.
  *
  * @param $entity_type
@@ -190,10 +213,10 @@ function user_uri($user) {
  * @return
  *   The name of the user.
  *
- * @see format_username
+ * @see user_format_name
  */
 function user_label($entity_type, $entity) {
-  return format_username($entity);
+  return user_format_name($entity);
 }
 
 /**
@@ -894,7 +917,7 @@ function user_search_execute($keys = NULL, $conditions = NULL) {
   $results = array();
   foreach ($accounts as $account) {
     $result = array(
-      'title' => format_username($account),
+      'title' => user_format_name($account),
       'link' => url('user/' . $account->uid, array('absolute' => TRUE)),
     );
     if (user_access('administer users')) {
@@ -1380,7 +1403,7 @@ function template_preprocess_user_picture(&$variables) {
       $filepath = variable_get('user_picture_default', '');
     }
     if (isset($filepath)) {
-      $alt = t("@user's picture", array('@user' => format_username($account)));
+      $alt = t("@user's picture", array('@user' => user_format_name($account)));
       // If the image does not have a valid Drupal scheme (for eg. HTTP),
       // don't load image styles.
       if (module_exists('image') && file_valid_uri($filepath) && $style = variable_get('user_picture_style', '')) {
@@ -1827,7 +1850,7 @@ function user_menu_title() {
  * Menu item title callback - use the user name.
  */
 function user_page_title($account) {
-  return is_object($account) ? format_username($account) : '';
+  return is_object($account) ? user_format_name($account) : '';
 }
 
 /**
diff --git a/core/modules/user/user.test b/core/modules/user/user.test
index 15c427b..f63166d 100644
--- a/core/modules/user/user.test
+++ b/core/modules/user/user.test
@@ -914,7 +914,7 @@ class UserPictureTestCase extends DrupalWebTestCase {
       // user's profile page.
       $text = t('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', array('%dimensions' => $test_dim));
       $this->assertRaw($text, t('Image was resized.'));
-      $alt = t("@user's picture", array('@user' => format_username($this->user)));
+      $alt = t("@user's picture", array('@user' => user_format_name($this->user)));
       $style = variable_get('user_picture_style', '');
       $this->assertRaw(image_style_url($style, $pic_path), t("Image is displayed in user's edit page"));
 
@@ -1914,7 +1914,7 @@ class UserTokenReplaceTestCase extends DrupalWebTestCase {
     // Generate and test sanitized tokens.
     $tests = array();
     $tests['[user:uid]'] = $account->uid;
-    $tests['[user:name]'] = check_plain(format_username($account));
+    $tests['[user:name]'] = check_plain(user_format_name($account));
     $tests['[user:mail]'] = check_plain($account->mail);
     $tests['[user:url]'] = url("user/$account->uid", $url_options);
     $tests['[user:edit-url]'] = url("user/$account->uid/edit", $url_options);
@@ -1922,7 +1922,7 @@ class UserTokenReplaceTestCase extends DrupalWebTestCase {
     $tests['[user:last-login:short]'] = format_date($account->login, 'short', '', NULL, $language->language);
     $tests['[user:created]'] = format_date($account->created, 'medium', '', NULL, $language->language);
     $tests['[user:created:short]'] = format_date($account->created, 'short', '', NULL, $language->language);
-    $tests['[current-user:name]'] = check_plain(format_username($global_account));
+    $tests['[current-user:name]'] = check_plain(user_format_name($global_account));
 
     // Test to make sure that we generated something for each token.
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), t('No empty tokens generated.'));
@@ -1933,9 +1933,9 @@ class UserTokenReplaceTestCase extends DrupalWebTestCase {
     }
 
     // Generate and test unsanitized tokens.
-    $tests['[user:name]'] = format_username($account);
+    $tests['[user:name]'] = user_format_name($account);
     $tests['[user:mail]'] = $account->mail;
-    $tests['[current-user:name]'] = format_username($global_account);
+    $tests['[current-user:name]'] = user_format_name($global_account);
 
     foreach ($tests as $input => $expected) {
       $output = token_replace($input, array('user' => $account), array('language' => $language, 'sanitize' => FALSE));
diff --git a/core/modules/user/user.tokens.inc b/core/modules/user/user.tokens.inc
index 8dcea4b..c0d0435 100644
--- a/core/modules/user/user.tokens.inc
+++ b/core/modules/user/user.tokens.inc
@@ -85,7 +85,7 @@ function user_tokens($type, $tokens, array $data = array(), array $options = arr
           break;
 
         case 'name':
-          $name = format_username($account);
+          $name = user_format_name($account);
           $replacements[$original] = $sanitize ? check_plain($name) : $name;
           break;
 
