diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 27494e7..3558434 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -676,7 +676,7 @@ function drupal_serve_page_from_cache(Response $response, Request $request) {
  * 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' => user_format_name($account)));
+ * $text = t("@name's blog", array('@name' => $account->getDisplayName()));
  * @endcode
  * Basically, you can put variables like @name into your string, and t() will
  * substitute their sanitized values at translation time. (See the
diff --git a/core/lib/Drupal/Core/Session/AccountInterface.php b/core/lib/Drupal/Core/Session/AccountInterface.php
index 084943b..59581aa 100644
--- a/core/lib/Drupal/Core/Session/AccountInterface.php
+++ b/core/lib/Drupal/Core/Session/AccountInterface.php
@@ -114,7 +114,17 @@ public function getPreferredLangcode($default = NULL);
   public function getPreferredAdminLangcode($default = NULL);
 
   /**
-   * Returns the username of this account.
+   * Returns the unique username of this account.
+   *
+   * @return string
+   *   An unsanitized string with the unique username. The code receiving this
+   *   result must ensure that \Drupal\Component\Utility\String::checkPlain()
+   *   is called on it before it is printed to the page or used in a template.
+   */
+  public function getName();
+
+  /**
+   * Returns the display name of this account.
    *
    * 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
@@ -123,13 +133,13 @@ public function getPreferredAdminLangcode($default = NULL);
    *
    * @see hook_user_format_name_alter()
    *
-   * @return
-   *   An unsanitized string with the username to display. The code receiving
-   *   this result must ensure that \Drupal\Component\Utility\String::checkPlain()
-   *   is called on it before it is
-   *   printed to the page.
+   * @return string
+   *   An unsanitized string with the user name to display. The code receiving
+   *   this result must ensure that
+   *   \Drupal\Component\Utility\String::checkPlain() is called on it before it
+   *   is printed to the page or used in a template.
    */
-  public function getUsername();
+  public function getDisplayName();
 
   /**
    * Returns the email address of this account.
diff --git a/core/lib/Drupal/Core/Session/AccountProxy.php b/core/lib/Drupal/Core/Session/AccountProxy.php
index 56a42fa..55a2700 100644
--- a/core/lib/Drupal/Core/Session/AccountProxy.php
+++ b/core/lib/Drupal/Core/Session/AccountProxy.php
@@ -161,8 +161,15 @@ public function getPreferredAdminLangcode($default = NULL) {
   /**
    * {@inheritdoc}
    */
-  public function getUsername() {
-    return $this->getAccount()->getUsername();
+  public function getName() {
+    return $this->getAccount()->getName();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getDisplayName() {
+    return $this->getAccount()->getDisplayName();
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Session/UserSession.php b/core/lib/Drupal/Core/Session/UserSession.php
index 912d755..25c57b4 100644
--- a/core/lib/Drupal/Core/Session/UserSession.php
+++ b/core/lib/Drupal/Core/Session/UserSession.php
@@ -63,7 +63,7 @@ class UserSession implements AccountInterface {
    *
    * @var string
    */
-  public $name;
+  public $name = '';
 
   /**
    * The preferred language code of the account.
@@ -208,7 +208,14 @@ function getPreferredAdminLangcode($default = NULL) {
   /**
    * {@inheritdoc}
    */
-  public function getUsername() {
+  public function getName() {
+    return $this->name;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getDisplayName() {
     $name = $this->name ?: \Drupal::config('user.settings')->get('anonymous');
     \Drupal::moduleHandler()->alter('user_format_name', $name, $this);
     return $name;
diff --git a/core/modules/action/src/Plugin/Action/EmailAction.php b/core/modules/action/src/Plugin/Action/EmailAction.php
index b973204..c1de23c 100644
--- a/core/modules/action/src/Plugin/Action/EmailAction.php
+++ b/core/modules/action/src/Plugin/Action/EmailAction.php
@@ -148,7 +148,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
       '#default_value' => $this->configuration['message'],
       '#cols' => '80',
       '#rows' => '20',
-      '#description' => t('The message that should be sent. You may include placeholders like [node:title], [user:name], and [comment:body] to represent data that will be different each time message is sent. Not all placeholders will be available in all contexts.'),
+      '#description' => t('The message that should be sent. You may include placeholders like [node:title], [user:display-name], [user:name] and [comment:body] to represent data that will be different each time message is sent. Not all placeholders will be available in all contexts.'),
     );
     return $form;
   }
diff --git a/core/modules/action/src/Plugin/Action/MessageAction.php b/core/modules/action/src/Plugin/Action/MessageAction.php
index ece48fa..350af1a 100644
--- a/core/modules/action/src/Plugin/Action/MessageAction.php
+++ b/core/modules/action/src/Plugin/Action/MessageAction.php
@@ -76,7 +76,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
       '#default_value' => $this->configuration['message'],
       '#required' => TRUE,
       '#rows' => '8',
-      '#description' => t('The message to be displayed to the current user. You may include placeholders like [node:title], [user:name], and [comment:body] to represent data that will be different each time message is sent. Not all placeholders will be available in all contexts.'),
+      '#description' => t('The message to be displayed to the current user. You may include placeholders like [node:title], [user:display-name], [user:name] and [comment:body] to represent data that will be different each time message is sent. Not all placeholders will be available in all contexts.'),
     );
     return $form;
   }
diff --git a/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php b/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
index ad70e3e..47964e5 100644
--- a/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
+++ b/core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
@@ -29,13 +29,13 @@ class BasicAuthTest extends WebTestBase {
   public function testBasicAuth() {
     $account = $this->drupalCreateUser();
 
-    $this->basicAuthGet('router_test/test11', $account->getUsername(), $account->pass_raw);
-    $this->assertText($account->getUsername(), 'Account name is displayed.');
+    $this->basicAuthGet('router_test/test11', $account->getName(), $account->pass_raw);
+    $this->assertText($account->getName(), 'Account name is displayed.');
     $this->assertResponse('200', 'HTTP response is OK');
     $this->curlClose();
 
-    $this->basicAuthGet('router_test/test11', $account->getUsername(), $this->randomName());
-    $this->assertNoText($account->getUsername(), 'Bad basic auth credentials do not authenticate the user.');
+    $this->basicAuthGet('router_test/test11', $account->getName(), $this->randomName());
+    $this->assertNoText($account->getName(), 'Bad basic auth credentials do not authenticate the user.');
     $this->assertResponse('403', 'Access is not granted.');
     $this->curlClose();
 
@@ -47,7 +47,7 @@ public function testBasicAuth() {
 
     $account = $this->drupalCreateUser(array('access administration pages'));
 
-    $this->basicAuthGet('admin', $account->getUsername(), $account->pass_raw);
+    $this->basicAuthGet('admin', $account->getName(), $account->pass_raw);
     $this->assertNoLink('Log out', 0, 'User is not logged in');
     $this->assertResponse('403', 'No basic authentication for routes not explicitly defining authentication providers.');
     $this->curlClose();
@@ -69,11 +69,11 @@ function testGlobalLoginFloodControl() {
 
     // Try 2 failed logins.
     for ($i = 0; $i < 2; $i++) {
-      $this->basicAuthGet('router_test/test11', $incorrect_user->getUsername(), $incorrect_user->pass_raw);
+      $this->basicAuthGet('router_test/test11', $incorrect_user->getName(), $incorrect_user->pass_raw);
     }
 
     // IP limit has reached to its limit. Even valid user credentials will fail.
-    $this->basicAuthGet('router_test/test11', $user->getUsername(), $user->pass_raw);
+    $this->basicAuthGet('router_test/test11', $user->getName(), $user->pass_raw);
     $this->assertResponse('403', 'Access is blocked because of IP based flood prevention.');
   }
 
@@ -93,24 +93,24 @@ function testPerUserLoginFloodControl() {
     $user2 = $this->drupalCreateUser(array());
 
     // Try a failed login.
-    $this->basicAuthGet('router_test/test11', $incorrect_user->getUsername(), $incorrect_user->pass_raw);
+    $this->basicAuthGet('router_test/test11', $incorrect_user->getName(), $incorrect_user->pass_raw);
 
     // A successful login will reset the per-user flood control count.
-    $this->basicAuthGet('router_test/test11', $user->getUsername(), $user->pass_raw);
+    $this->basicAuthGet('router_test/test11', $user->getName(), $user->pass_raw);
     $this->assertResponse('200', 'Per user flood prevention gets reset on a successful login.');
 
     // Try 2 failed logins for a user. They will trigger flood control.
     for ($i = 0; $i < 2; $i++) {
-      $this->basicAuthGet('router_test/test11', $incorrect_user->getUsername(), $incorrect_user->pass_raw);
+      $this->basicAuthGet('router_test/test11', $incorrect_user->getName(), $incorrect_user->pass_raw);
     }
 
     // Now the user account is blocked.
-    $this->basicAuthGet('router_test/test11', $user->getUsername(), $user->pass_raw);
+    $this->basicAuthGet('router_test/test11', $user->getName(), $user->pass_raw);
     $this->assertResponse('403', 'The user account is blocked due to per user flood prevention.');
 
     // Try one successful attempt for a different user, it should not trigger
     // any flood control.
-    $this->basicAuthGet('router_test/test11', $user2->getUsername(), $user2->pass_raw);
+    $this->basicAuthGet('router_test/test11', $user2->getName(), $user2->pass_raw);
     $this->assertResponse('200', 'Per user flood prevention does not block access for other users.');
   }
 
diff --git a/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareBlock.php b/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareBlock.php
index 0b94414..aeca18b 100644
--- a/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareBlock.php
+++ b/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareBlock.php
@@ -29,7 +29,7 @@ public function build() {
     /** @var $user \Drupal\user\UserInterface */
     $user = $this->getContextValue('user');
     return array(
-      '#markup' => $user->getUsername(),
+      '#markup' => $user->getName(),
     );
   }
 
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 5ce3ba9..993569b 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -761,23 +761,7 @@ function comment_preview(CommentInterface $comment, FormStateInterface $form_sta
   $entity = $comment->getCommentedEntity();
 
   if (!form_get_errors($form_state)) {
-    // Attach the user and time information.
-    $author_name = $comment->getAuthorName();
-    if (!empty($author_name)) {
-      $account = user_load_by_name($author_name);
-    }
-    elseif (\Drupal::currentUser()->isAuthenticated() && empty($comment->is_anonymous)) {
-      $account = \Drupal::currentUser();
-    }
-
-    if (!empty($account) && $account->isAuthenticated()) {
-      $comment->setOwner($account);
-      $comment->setAuthorName(String::checkPlain($account->getUsername()));
-    }
-    elseif (empty($author_name)) {
-      $comment->setAuthorName(\Drupal::config('user.settings')->get('anonymous'));
-    }
-
+    // Attach the time information.
     $created_time = !is_null($comment->getCreatedTime()) ? $comment->getCreatedTime() : REQUEST_TIME;
     $comment->setCreatedTime($created_time);
     $comment->changed->value = REQUEST_TIME;
diff --git a/core/modules/comment/src/CommentForm.php b/core/modules/comment/src/CommentForm.php
index fc778d5..d66b9a7 100644
--- a/core/modules/comment/src/CommentForm.php
+++ b/core/modules/comment/src/CommentForm.php
@@ -123,7 +123,7 @@ public function form(array $form, FormStateInterface $form_state) {
     }
     else {
       if ($this->currentUser->isAuthenticated()) {
-        $author = $this->currentUser->getUsername();
+        $author = $this->currentUser->getName();
       }
       else {
         $author = ($comment->getAuthorName() ? $comment->getAuthorName() : '');
@@ -213,6 +213,12 @@ public function form(array $form, FormStateInterface $form_state) {
       '#value' => ($comment->id() ? !$comment->getOwnerId() : $this->currentUser->isAnonymous()),
     );
 
+    // Set the uid on new comments to the current user.
+    $form['uid'] = array(
+      '#type' => 'value',
+      '#value' => $comment->id() ? $comment->getOwnerId() : $this->currentUser->id(),
+    );
+
     return parent::form($form, $form_state, $comment);
   }
 
@@ -309,13 +315,7 @@ public function submit(array $form, FormStateInterface $form_state) {
     /** @var \Drupal\comment\CommentInterface $comment */
     $comment = parent::submit($form, $form_state);
 
-    // If the comment was posted by a registered user, assign the author's ID.
-    // @todo Too fragile. Should be prepared and stored in comment_form()
-    // already.
     $author_name = $comment->getAuthorName();
-    if (!$comment->is_anonymous && !empty($author_name) && ($account = user_load_by_name($author_name))) {
-      $comment->setOwner($account);
-    }
     // If the comment was posted by an anonymous user and no author name was
     // required, use "Anonymous" by default.
     if ($comment->is_anonymous && (!isset($author_name) || $author_name === '')) {
diff --git a/core/modules/comment/src/Entity/Comment.php b/core/modules/comment/src/Entity/Comment.php
index fbc95b0..16b8290 100644
--- a/core/modules/comment/src/Entity/Comment.php
+++ b/core/modules/comment/src/Entity/Comment.php
@@ -130,7 +130,7 @@ public function preSave(EntityStorageInterface $storage) {
       // We test the value with '===' because we need to modify anonymous
       // users as well.
       if ($this->getOwnerId() === \Drupal::currentUser()->id() && \Drupal::currentUser()->isAuthenticated()) {
-        $this->setAuthorName(\Drupal::currentUser()->getUsername());
+        $this->setAuthorName(\Drupal::currentUser()->getName());
       }
       // Add the values which aren't passed into the function.
       $this->setThread($thread);
diff --git a/core/modules/comment/src/Tests/CommentAnonymousTest.php b/core/modules/comment/src/Tests/CommentAnonymousTest.php
index f4018f9..e720c73 100644
--- a/core/modules/comment/src/Tests/CommentAnonymousTest.php
+++ b/core/modules/comment/src/Tests/CommentAnonymousTest.php
@@ -61,7 +61,7 @@ function testAnonymous() {
 
     // Ensure anonymous users cannot post in the name of registered users.
     $edit = array(
-      'name' => $this->admin_user->getUsername(),
+      'name' => $this->admin_user->getName(),
       'mail' => $this->randomName() . '@example.com',
       'subject[0][value]' => $this->randomName(),
       'comment_body[0][value]' => $this->randomName(),
diff --git a/core/modules/comment/src/Tests/CommentInterfaceTest.php b/core/modules/comment/src/Tests/CommentInterfaceTest.php
index 1455d8d..5c0b790 100644
--- a/core/modules/comment/src/Tests/CommentInterfaceTest.php
+++ b/core/modules/comment/src/Tests/CommentInterfaceTest.php
@@ -87,8 +87,8 @@ function testCommentInterface() {
 
     // Test changing the comment author to a verified user.
     $this->drupalGet('comment/' . $comment->id() . '/edit');
-    $comment = $this->postComment(NULL, $comment->comment_body->value, $comment->getSubject(), array('name' => $this->web_user->getUsername()));
-    $this->assertTrue($comment->getAuthorName() == $this->web_user->getUsername() && $comment->getOwnerId() == $this->web_user->id(), 'Comment author successfully changed to a registered user.');
+    $comment = $this->postComment(NULL, $comment->comment_body->value, $comment->getSubject(), array('name' => $this->web_user->getName()));
+    $this->assertTrue($comment->getAuthorName() == $this->web_user->getName() && $comment->getOwnerId() == $this->web_user->id(), 'Comment author successfully changed to a registered user.');
 
     $this->drupalLogout();
 
diff --git a/core/modules/comment/src/Tests/CommentPreviewTest.php b/core/modules/comment/src/Tests/CommentPreviewTest.php
index aec0350..b0a7ed4 100644
--- a/core/modules/comment/src/Tests/CommentPreviewTest.php
+++ b/core/modules/comment/src/Tests/CommentPreviewTest.php
@@ -85,7 +85,7 @@ function testCommentEditPreviewSave() {
     $date = new DrupalDateTime('2008-03-02 17:23');
     $edit['subject[0][value]'] = $this->randomName(8);
     $edit['comment_body[0][value]'] = $this->randomName(16);
-    $edit['name'] = $web_user->getUsername();
+    $edit['name'] = $web_user->getName();
     $edit['date[date]'] = $date->format('Y-m-d');
     $edit['date[time]'] = $date->format('H:i:s');
     $raw_date = $date->getTimestamp();
diff --git a/core/modules/comment/src/Tests/CommentTokenReplaceTest.php b/core/modules/comment/src/Tests/CommentTokenReplaceTest.php
index 27b6e39..89bd6c4 100644
--- a/core/modules/comment/src/Tests/CommentTokenReplaceTest.php
+++ b/core/modules/comment/src/Tests/CommentTokenReplaceTest.php
@@ -66,7 +66,7 @@ function testCommentTokenReplacement() {
     $tests['[comment:node:nid]'] = $comment->getCommentedEntityId();
     $tests['[comment:node:title]'] = String::checkPlain($node->getTitle());
     $tests['[comment:author:uid]'] = $comment->getOwnerId();
-    $tests['[comment:author:name]'] = String::checkPlain($this->admin_user->getUsername());
+    $tests['[comment:author:name]'] = String::checkPlain($this->admin_user->getName());
 
     // Test to make sure that we generated something for each token.
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
@@ -86,7 +86,7 @@ function testCommentTokenReplacement() {
     $tests['[comment:body]'] = $comment->comment_body->value;
     $tests['[comment:parent:title]'] = $parent_comment->getSubject();
     $tests['[comment:node:title]'] = $node->getTitle();
-    $tests['[comment:author:name]'] = $this->admin_user->getUsername();
+    $tests['[comment:author:name]'] = $this->admin_user->getName();
 
     foreach ($tests as $input => $expected) {
       $output = $token_service->replace($input, array('comment' => $comment), array('langcode' => $language_interface->id, 'sanitize' => FALSE));
diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module
index bee5dcf..73b4167 100644
--- a/core/modules/contact/contact.module
+++ b/core/modules/contact/contact.module
@@ -115,7 +115,7 @@ function contact_mail($key, &$message, $params) {
     '!subject' => $contact_message->getSubject(),
     '!category' => !empty($params['contact_category']) ? $params['contact_category']->label() : NULL,
     '!form-url' => url(current_path(), array('absolute' => TRUE, 'language' => $language)),
-    '!sender-name' => user_format_name($sender),
+    '!sender-name' => $sender->getDisplayName(),
   );
   if ($sender->isAuthenticated()) {
     $variables['!sender-url'] = $sender->url('canonical', array('absolute' => TRUE, 'language' => $language));
@@ -143,7 +143,7 @@ function contact_mail($key, &$message, $params) {
     case 'user_mail':
     case 'user_copy':
       $variables += array(
-        '!recipient-name' => user_format_name($params['recipient']),
+        '!recipient-name' => $params['recipient']->getDisplayName(),
         '!recipient-edit-url' => url('user/' . $params['recipient']->id() . '/edit', array('absolute' => TRUE, 'language' => $language)),
       );
       $message['subject'] .= t('[!site-name] !subject', $variables, $options);
diff --git a/core/modules/contact/src/Controller/ContactController.php b/core/modules/contact/src/Controller/ContactController.php
index b257ade..a2ae2e9 100644
--- a/core/modules/contact/src/Controller/ContactController.php
+++ b/core/modules/contact/src/Controller/ContactController.php
@@ -128,7 +128,7 @@ public function contactPersonalPage(UserInterface $user) {
     ));
 
     $form = $this->entityFormBuilder()->getForm($message);
-    $form['#title'] = $this->t('Contact @username', array('@username' => $user->getUsername()));
+    $form['#title'] = $this->t('Contact @username', array('@username' => $user->getDisplayName()));
     return $form;
   }
 
diff --git a/core/modules/contact/src/MessageForm.php b/core/modules/contact/src/MessageForm.php
index 69c804a..baf0bf6 100644
--- a/core/modules/contact/src/MessageForm.php
+++ b/core/modules/contact/src/MessageForm.php
@@ -115,9 +115,9 @@ public function form(array $form, FormStateInterface $form_state) {
     // prevent the impersonation of other users.
     else {
       $form['name']['#type'] = 'item';
-      $form['name']['#value'] = $user->getUsername();
+      $form['name']['#value'] = $user->getName();
       $form['name']['#required'] = FALSE;
-      $form['name']['#markup'] = String::checkPlain($user->getUsername());
+      $form['name']['#markup'] = String::checkPlain($user->getName());
 
       $form['mail']['#type'] = 'item';
       $form['mail']['#value'] = $user->getEmail();
@@ -249,7 +249,7 @@ public function save(array $form, FormStateInterface $form_state) {
       $this->logger('contact')->notice('%sender-name (@sender-from) sent %recipient-name an email.', array(
         '%sender-name' => $sender->getUsername(),
         '@sender-from' => $sender->getEmail(),
-        '%recipient-name' => $message->getPersonalRecipient()->getUsername(),
+        '%recipient-name' => $message->getPersonalRecipient()->getName(),
       ));
     }
 
diff --git a/core/modules/content_translation/src/ContentTranslationHandler.php b/core/modules/content_translation/src/ContentTranslationHandler.php
index d7601e7..8deae1d 100644
--- a/core/modules/content_translation/src/ContentTranslationHandler.php
+++ b/core/modules/content_translation/src/ContentTranslationHandler.php
@@ -239,10 +239,10 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En
       // Default to the anonymous user.
       $name = '';
       if ($new_translation) {
-        $name = \Drupal::currentUser()->getUsername();
+        $name = \Drupal::currentUser()->getName();
       }
       elseif ($entity->translation[$form_langcode]['uid']) {
-        $name = user_load($entity->translation[$form_langcode]['uid'])->getUsername();
+        $name = user_load($entity->translation[$form_langcode]['uid'])->getName();
       }
       $form['content_translation']['name'] = array(
         '#type' => 'textfield',
diff --git a/core/modules/content_translation/src/Tests/ContentTranslationUITest.php b/core/modules/content_translation/src/Tests/ContentTranslationUITest.php
index 10b56cb..ff190d9 100644
--- a/core/modules/content_translation/src/Tests/ContentTranslationUITest.php
+++ b/core/modules/content_translation/src/Tests/ContentTranslationUITest.php
@@ -196,7 +196,7 @@ protected function doTestAuthoringInfo() {
         'created' => REQUEST_TIME - mt_rand(0, 1000),
       );
       $edit = array(
-        'content_translation[name]' => $user->getUsername(),
+        'content_translation[name]' => $user->getName(),
         'content_translation[created]' => format_date($values[$langcode]['created'], 'custom', 'Y-m-d H:i:s O'),
       );
       $prefix = $index > 0 ? $langcode . '/' : '';
diff --git a/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php b/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php
index 89e43b6..2783590 100644
--- a/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php
+++ b/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php
@@ -114,7 +114,7 @@ function testWorkflows() {
   protected function assertWorkflows(UserInterface $user, $expected_status) {
     $default_langcode = $this->langcodes[0];
     $languages = $this->container->get('language_manager')->getLanguages();
-    $args = array('@user_label' => $user->getUsername());
+    $args = array('@user_label' => $user->getName());
     $this->drupalLogin($user);
 
     // Check whether the user is allowed to access the entity form in edit mode.
diff --git a/core/modules/file/src/Tests/FileFieldPathTest.php b/core/modules/file/src/Tests/FileFieldPathTest.php
index 2c1ae66..37edd85 100644
--- a/core/modules/file/src/Tests/FileFieldPathTest.php
+++ b/core/modules/file/src/Tests/FileFieldPathTest.php
@@ -43,7 +43,7 @@ function testUploadPath() {
 
     // Check the path when used with tokens.
     // Change the path to contain multiple token directories.
-    $this->updateFileField($field_name, $type_name, array('file_directory' => '[current-user:uid]/[current-user:name]'));
+    $this->updateFileField($field_name, $type_name, array('file_directory' => '[current-user:uid]/[current-user:display-name]'));
 
     // Upload a new file into the token subdirectories.
     $nid = $this->uploadNodeFile($test_file, $field_name, $type_name);
diff --git a/core/modules/file/src/Tests/FileTokenReplaceTest.php b/core/modules/file/src/Tests/FileTokenReplaceTest.php
index 481e8f4..9df387e 100644
--- a/core/modules/file/src/Tests/FileTokenReplaceTest.php
+++ b/core/modules/file/src/Tests/FileTokenReplaceTest.php
@@ -52,7 +52,7 @@ function testFileTokenReplacement() {
     $tests['[file:created:short]'] = format_date($file->getCreatedTime(), 'short', '', NULL, $language_interface->id);
     $tests['[file:changed]'] = format_date($file->getChangedTime(), 'medium', '', NULL, $language_interface->id);
     $tests['[file:changed:short]'] = format_date($file->getChangedTime(), 'short', '', NULL, $language_interface->id);
-    $tests['[file:owner]'] = String::checkPlain(user_format_name($this->admin_user));
+    $tests['[file:owner]'] = String::checkPlain($this->admin_user->getDisplayName());
     $tests['[file:owner:uid]'] = $file->getOwnerId();
 
     // Test to make sure that we generated something for each token.
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 425b597..4f7823a 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -557,7 +557,7 @@ function template_preprocess_forums(&$variables) {
         }
         $forum_submitted = array('#theme' => 'forum_submitted', '#topic' => (object) array(
           'uid' => $topic->getOwnerId(),
-          'name' => $topic->getOwner()->getUsername(),
+          'name' => $topic->getOwner()->getDisplayName(),
           'created' => $topic->getCreatedTime(),
         ));
         $variables['topics'][$id]->submitted = drupal_render($forum_submitted);
diff --git a/core/modules/node/src/Controller/NodeController.php b/core/modules/node/src/Controller/NodeController.php
index b09a3a7..5da4376 100644
--- a/core/modules/node/src/Controller/NodeController.php
+++ b/core/modules/node/src/Controller/NodeController.php
@@ -96,7 +96,7 @@ public function add(NodeTypeInterface $node_type) {
 
     $node = $this->entityManager()->getStorage('node')->create(array(
       'uid' => $account->id(),
-      'name' => $account->getUsername() ?: '',
+      'name' => $account->getName() ?: '',
       'type' => $node_type->type,
       'langcode' => $langcode ? $langcode : $this->languageManager()->getCurrentLanguage()->id,
     ));
diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php
index b31e6a9..0de432a 100644
--- a/core/modules/node/src/NodeForm.php
+++ b/core/modules/node/src/NodeForm.php
@@ -159,7 +159,7 @@ public function form(array $form, FormStateInterface $form_state) {
       '#title' => t('Authored by'),
       '#maxlength' => 60,
       '#autocomplete_route_name' => 'user.autocomplete',
-      '#default_value' => $node->getOwnerId()? $node->getOwner()->getUsername() : '',
+      '#default_value' => $node->getOwnerId()? $node->getOwner()->getName() : '',
       '#weight' => -1,
       '#description' => t('Leave blank for %anonymous.', array('%anonymous' => $user_config->get('anonymous'))),
       '#group' => 'author',
diff --git a/core/modules/node/src/Plugin/views/row/Rss.php b/core/modules/node/src/Plugin/views/row/Rss.php
index 9d3db7b..468dcf2 100644
--- a/core/modules/node/src/Plugin/views/row/Rss.php
+++ b/core/modules/node/src/Plugin/views/row/Rss.php
@@ -122,7 +122,7 @@ public function render($row) {
       ),
       array(
         'key' => 'dc:creator',
-        'value' => $node->getOwner()->getUsername(),
+        'value' => $node->getOwner()->getDisplayName(),
       ),
       array(
         'key' => 'guid',
diff --git a/core/modules/node/src/Tests/NodeTokenReplaceTest.php b/core/modules/node/src/Tests/NodeTokenReplaceTest.php
index a80ed79..42b46f3 100644
--- a/core/modules/node/src/Tests/NodeTokenReplaceTest.php
+++ b/core/modules/node/src/Tests/NodeTokenReplaceTest.php
@@ -71,9 +71,9 @@ function testNodeTokenReplacement() {
     $tests['[node:langcode]'] = String::checkPlain($node->language()->id);
     $tests['[node:url]'] = url('node/' . $node->id(), $url_options);
     $tests['[node:edit-url]'] = url('node/' . $node->id() . '/edit', $url_options);
-    $tests['[node:author]'] = String::checkPlain($account->getUsername());
+    $tests['[node:author]'] = String::checkPlain($account->getName());
     $tests['[node:author:uid]'] = $node->getOwnerId();
-    $tests['[node:author:name]'] = String::checkPlain($account->getUsername());
+    $tests['[node:author:name]'] = String::checkPlain($account->getName());
     $tests['[node:created:since]'] = \Drupal::service('date')->formatInterval(REQUEST_TIME - $node->getCreatedTime(), 2, $this->interfaceLanguage->id);
     $tests['[node:changed:since]'] = \Drupal::service('date')->formatInterval(REQUEST_TIME - $node->getChangedTime(), 2, $this->interfaceLanguage->id);
 
@@ -90,7 +90,7 @@ function testNodeTokenReplacement() {
     $tests['[node:body]'] = $node->body->value;
     $tests['[node:summary]'] = $node->body->summary;
     $tests['[node:langcode]'] = $node->language()->id;
-    $tests['[node:author:name]'] = $account->getUsername();
+    $tests['[node:author:name]'] = $account->getName();
 
     foreach ($tests as $input => $expected) {
       $output = $this->tokenService->replace($input, array('node' => $node), array('langcode' => $this->interfaceLanguage->id, 'sanitize' => FALSE));
diff --git a/core/modules/node/src/Tests/NodeTranslationUITest.php b/core/modules/node/src/Tests/NodeTranslationUITest.php
index ea4cb9f..98d35ae 100644
--- a/core/modules/node/src/Tests/NodeTranslationUITest.php
+++ b/core/modules/node/src/Tests/NodeTranslationUITest.php
@@ -152,7 +152,7 @@ protected function doTestAuthoringInfo() {
         'promote' => (bool) mt_rand(0, 1),
       );
       $edit = array(
-        'uid' => $user->getUsername(),
+        'uid' => $user->getName(),
         'created[date]' => format_date($values[$langcode]['created'], 'custom', 'Y-m-d'),
         'created[time]' => format_date($values[$langcode]['created'], 'custom', 'H:i:s'),
         'sticky' => $values[$langcode]['sticky'],
diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module
index 0ee6614..b4478d0 100644
--- a/core/modules/rdf/rdf.module
+++ b/core/modules/rdf/rdf.module
@@ -363,7 +363,7 @@ function rdf_preprocess_user(&$variables) {
         '#attributes' => array(
           'about' => $account->url(),
           'property' => $name_mapping['properties'],
-          'content' => $account->getUsername(),
+          'content' => $account->getDisplayName(),
           'lang' => '',
         ),
       );
diff --git a/core/modules/rdf/src/Tests/CommentAttributesTest.php b/core/modules/rdf/src/Tests/CommentAttributesTest.php
index e8b15d7..27fefb5 100644
--- a/core/modules/rdf/src/Tests/CommentAttributesTest.php
+++ b/core/modules/rdf/src/Tests/CommentAttributesTest.php
@@ -291,7 +291,7 @@ function _testBasicCommentRdfaMarkup($graph, CommentInterface $comment, $account
     }
 
     // Author name.
-    $name = empty($account["name"]) ? $this->web_user->getUsername() : $account["name"] . " (not verified)";
+    $name = empty($account["name"]) ? $this->web_user->getName() : $account["name"] . " (not verified)";
     $expected_value = array(
       'type' => 'literal',
       'value' => $name,
diff --git a/core/modules/rdf/src/Tests/StandardProfileTest.php b/core/modules/rdf/src/Tests/StandardProfileTest.php
index be714fa..96177a7 100644
--- a/core/modules/rdf/src/Tests/StandardProfileTest.php
+++ b/core/modules/rdf/src/Tests/StandardProfileTest.php
@@ -473,7 +473,7 @@ protected function assertRdfaNodeCommentProperties($graph) {
     // Comment author name.
     $expected_value = array(
       'type' => 'literal',
-      'value' => $this->webUser->getUsername(),
+      'value' => $this->webUser->getName(),
     );
     $this->assertTrue($graph->hasProperty($this->commenterUri, 'http://schema.org/name', $expected_value), 'Comment author name was found (schema:name).');
   }
diff --git a/core/modules/rest/src/Tests/AuthTest.php b/core/modules/rest/src/Tests/AuthTest.php
index b53beaf..ea019c0 100644
--- a/core/modules/rest/src/Tests/AuthTest.php
+++ b/core/modules/rest/src/Tests/AuthTest.php
@@ -62,7 +62,7 @@ public function testRead() {
 
     // Now read it with the Basic authentication which is enabled and should
     // work.
-    $this->basicAuthGet($entity->getSystemPath(), $account->getUsername(), $account->pass_raw);
+    $this->basicAuthGet($entity->getSystemPath(), $account->getName(), $account->pass_raw);
     $this->assertResponse('200', 'HTTP response code is 200 for successfully authorized requests.');
     $this->curlClose();
   }
diff --git a/core/modules/rest/src/Tests/CsrfTest.php b/core/modules/rest/src/Tests/CsrfTest.php
index 9d526c9..1903e87 100644
--- a/core/modules/rest/src/Tests/CsrfTest.php
+++ b/core/modules/rest/src/Tests/CsrfTest.php
@@ -64,7 +64,7 @@ public function testBasicAuth() {
 
     $curl_options = $this->getCurlOptions();
     $curl_options[CURLOPT_HTTPAUTH] = CURLAUTH_BASIC;
-    $curl_options[CURLOPT_USERPWD] = $this->account->getUsername() . ':' . $this->account->pass_raw;
+    $curl_options[CURLOPT_USERPWD] = $this->account->getName() . ':' . $this->account->pass_raw;
     $this->curlExec($curl_options);
     $this->assertResponse(201);
     // Ensure that the entity was created.
diff --git a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
index 84ef12a..951c7aa 100644
--- a/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
+++ b/core/modules/search/src/Tests/SearchConfigSettingsFormTest.php
@@ -136,7 +136,7 @@ function testSearchModuleDisabling() {
         'text' => $this->search_node->label(),
       ),
       'user_search' => array(
-        'keys' => $this->search_user->getUsername(),
+        'keys' => $this->search_user->getName(),
         'text' => $this->search_user->getEmail(),
       ),
       'dummy_search_type' => array(
diff --git a/core/modules/shortcut/src/Form/SwitchShortcutSet.php b/core/modules/shortcut/src/Form/SwitchShortcutSet.php
index 462cf40..1cb48d4 100644
--- a/core/modules/shortcut/src/Form/SwitchShortcutSet.php
+++ b/core/modules/shortcut/src/Form/SwitchShortcutSet.php
@@ -199,7 +199,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
       ));
       $set->save();
       $replacements = array(
-        '%user' => $this->user->label(),
+        '%user' => $this->user->getDisplayName(),
         '%set_name' => $set->label(),
         '@switch-url' => $this->url($this->routeMatch->getRouteName(), array('user' => $this->user->id())),
       );
@@ -223,7 +223,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
       /* @var \Drupal\shortcut\Entity\ShortcutSet $set */
       $set = $this->shortcutSetStorage->load($form_state['values']['set']);
       $replacements = array(
-        '%user' => $this->user->label(),
+        '%user' => $this->user->getDisplayName(),
         '%set_name' => $set->label(),
       );
       drupal_set_message($account_is_user ? $this->t('You are now using the %set_name shortcut set.', $replacements) : $this->t('%user is now using the %set_name shortcut set.', $replacements));
diff --git a/core/modules/simpletest/src/Tests/SimpleTestTest.php b/core/modules/simpletest/src/Tests/SimpleTestTest.php
index 6e8703a..afca4aa 100644
--- a/core/modules/simpletest/src/Tests/SimpleTestTest.php
+++ b/core/modules/simpletest/src/Tests/SimpleTestTest.php
@@ -112,7 +112,7 @@ function testInternalBrowser() {
       // Check that current user service updated to anonymous user.
       $this->assertEqual(0, $this->container->get('current_user')->id(), 'Current user service updated.');
       $edit = array(
-        'name' => $user->getUsername(),
+        'name' => $user->getName(),
         'pass' => $user->pass_raw
       );
       $this->maximumRedirects = 1;
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index 956080a..e689721 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -691,7 +691,7 @@ protected function drupalLogin(AccountInterface $account) {
     }
 
     $edit = array(
-      'name' => $account->getUsername(),
+      'name' => $account->getName(),
       'pass' => $account->pass_raw
     );
     $this->drupalPostForm('user', $edit, t('Log in'));
@@ -700,7 +700,7 @@ protected function drupalLogin(AccountInterface $account) {
     if (isset($this->session_id)) {
       $account->session_id = $this->session_id;
     }
-    $pass = $this->assert($this->drupalUserIsLoggedIn($account), format_string('User %name successfully logged in.', array('%name' => $account->getUsername())), 'User login');
+    $pass = $this->assert($this->drupalUserIsLoggedIn($account), format_string('User %name successfully logged in.', array('%name' => $account->getName())), 'User login');
     if ($pass) {
       $this->loggedInUser = $account;
       $this->container->get('current_user')->setAccount($account);
diff --git a/core/modules/system/src/Tests/Entity/EntityFieldTest.php b/core/modules/system/src/Tests/Entity/EntityFieldTest.php
index 5d5b9e4..c7840a5 100644
--- a/core/modules/system/src/Tests/Entity/EntityFieldTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityFieldTest.php
@@ -120,13 +120,13 @@ protected function assertReadWrite($entity_type) {
     $new_user = $this->createUser();
     $entity->user_id->entity = $new_user;
     $this->assertEqual($new_user->id(), $entity->user_id->target_id, format_string('%entity_type: Updated user id can be read.', array('%entity_type' => $entity_type)));
-    $this->assertEqual($new_user->getUsername(), $entity->user_id->entity->name->value, format_string('%entity_type: Updated user name value can be read.', array('%entity_type' => $entity_type)));
+    $this->assertEqual($new_user->getName(), $entity->user_id->entity->name->value, format_string('%entity_type: Updated user name value can be read.', array('%entity_type' => $entity_type)));
 
     // Change the assigned user by id.
     $new_user = $this->createUser();
     $entity->user_id->target_id = $new_user->id();
     $this->assertEqual($new_user->id(), $entity->user_id->target_id, format_string('%entity_type: Updated user id can be read.', array('%entity_type' => $entity_type)));
-    $this->assertEqual($new_user->getUsername(), $entity->user_id->entity->name->value, format_string('%entity_type: Updated user name value can be read.', array('%entity_type' => $entity_type)));
+    $this->assertEqual($new_user->getName(), $entity->user_id->entity->name->value, format_string('%entity_type: Updated user name value can be read.', array('%entity_type' => $entity_type)));
 
     // Try unsetting a field.
     $entity->name->value = NULL;
@@ -214,7 +214,7 @@ protected function assertReadWrite($entity_type) {
     ));
     $this->assertEqual($this->entity_name, $entity->name->value, format_string('%entity_type: Name value can be read.', array('%entity_type' => $entity_type)));
     $this->assertEqual($this->entity_user->id(), $entity->user_id->target_id, format_string('%entity_type: User id can be read.', array('%entity_type' => $entity_type)));
-    $this->assertEqual($this->entity_user->getUsername(), $entity->user_id->entity->name->value, format_string('%entity_type: User name can be read.', array('%entity_type' => $entity_type)));
+    $this->assertEqual($this->entity_user->getName(), $entity->user_id->entity->name->value, format_string('%entity_type: User name can be read.', array('%entity_type' => $entity_type)));
     $this->assertEqual($this->entity_field_text, $entity->field_test_text->value, format_string('%entity_type: Text field can be read.', array('%entity_type' => $entity_type)));
 
     // Test copying field values.
diff --git a/core/modules/system/src/Tests/Menu/BreadcrumbTest.php b/core/modules/system/src/Tests/Menu/BreadcrumbTest.php
index ec6201a..0b24557 100644
--- a/core/modules/system/src/Tests/Menu/BreadcrumbTest.php
+++ b/core/modules/system/src/Tests/Menu/BreadcrumbTest.php
@@ -327,11 +327,11 @@ function testBreadCrumbs() {
 
     // Verify correct breadcrumb and page title when viewing own user account.
     $trail = $home;
-    $this->assertBreadcrumb('user/' . $this->web_user->id(), $trail, $this->web_user->getUsername());
+    $this->assertBreadcrumb('user/' . $this->web_user->id(), $trail, $this->web_user->getName());
     $trail += array(
-      'user/' . $this->web_user->id() => $this->web_user->getUsername(),
+      'user/' . $this->web_user->id() => $this->web_user->getName(),
     );
-    $this->assertBreadcrumb('user/' . $this->web_user->id() . '/edit', $trail, $this->web_user->getUsername());
+    $this->assertBreadcrumb('user/' . $this->web_user->id() . '/edit', $trail, $this->web_user->getName());
 
     // Create an only slightly privileged user being able to access site reports
     // but not administration pages.
diff --git a/core/modules/system/src/Tests/Path/UrlAlterFunctionalTest.php b/core/modules/system/src/Tests/Path/UrlAlterFunctionalTest.php
index 92ab50f..aa655fa 100644
--- a/core/modules/system/src/Tests/Path/UrlAlterFunctionalTest.php
+++ b/core/modules/system/src/Tests/Path/UrlAlterFunctionalTest.php
@@ -31,7 +31,7 @@ function testUrlAlter() {
     $this->drupalLogin($account);
 
     $uid = $account->id();
-    $name = $account->getUsername();
+    $name = $account->getName();
 
     // Test a single altered path.
     $this->drupalGet("user/$name");
diff --git a/core/modules/system/src/Tests/Routing/RouterTest.php b/core/modules/system/src/Tests/Routing/RouterTest.php
index a7bb8b2..87da4f0 100644
--- a/core/modules/system/src/Tests/Routing/RouterTest.php
+++ b/core/modules/system/src/Tests/Routing/RouterTest.php
@@ -165,11 +165,11 @@ public function testUserAccount() {
     $second_account = $this->drupalCreateUser();
 
     $this->drupalGet('router_test/test12/' . $second_account->id());
-    $this->assertText($account->getUsername() . ':' . $second_account->getUsername());
+    $this->assertText($account->getName() . ':' . $second_account->getName());
     $this->assertEqual($account->id(), $this->loggedInUser->id(), 'Ensure that the user was not changed.');
 
     $this->drupalGet('router_test/test13/' . $second_account->id());
-    $this->assertText($account->getUsername() . ':' . $second_account->getUsername());
+    $this->assertText($account->getName() . ':' . $second_account->getName());
     $this->assertEqual($account->id(), $this->loggedInUser->id(), 'Ensure that the user was not changed.');
   }
 
diff --git a/core/modules/system/src/Tests/Session/SessionHttpsTest.php b/core/modules/system/src/Tests/Session/SessionHttpsTest.php
index dadd7cd..ed0a814 100644
--- a/core/modules/system/src/Tests/Session/SessionHttpsTest.php
+++ b/core/modules/system/src/Tests/Session/SessionHttpsTest.php
@@ -49,7 +49,7 @@ protected function testHttpsSession() {
     $this->drupalGet('user');
     $form = $this->xpath('//form[@id="user-login-form"]');
     $form[0]['action'] = $this->httpsUrl('user');
-    $edit = array('name' => $user->getUsername(), 'pass' => $user->pass_raw);
+    $edit = array('name' => $user->getName(), 'pass' => $user->pass_raw);
     $this->drupalPostForm(NULL, $edit, t('Log in'));
 
     // Test a second concurrent session.
@@ -92,7 +92,7 @@ protected function testHttpsSession() {
     $this->drupalGet('user');
     $form = $this->xpath('//form[@id="user-login-form"]');
     $form[0]['action'] = $this->httpUrl('user');
-    $edit = array('name' => $user->getUsername(), 'pass' => $user->pass_raw);
+    $edit = array('name' => $user->getName(), 'pass' => $user->pass_raw);
     $this->drupalPostForm(NULL, $edit, t('Log in'));
     $this->drupalGet($this->httpUrl('admin/config'));
     $this->assertResponse(200);
@@ -159,7 +159,7 @@ protected function testMixedModeSslSession() {
     $form[0]['action'] = $this->httpsUrl('user');
 
     $edit = array(
-      'name' => $user->getUsername(),
+      'name' => $user->getName(),
       'pass' => $user->pass_raw,
     );
     $this->drupalPostForm(NULL, $edit, t('Log in'));
@@ -248,7 +248,7 @@ protected function testCsrfTokenWithMixedModeSsl() {
     $this->drupalGet('user');
     $form = $this->xpath('//form[@id="user-login-form"]');
     $form[0]['action'] = $this->httpsUrl('user');
-    $edit = array('name' => $user->getUsername(), 'pass' => $user->pass_raw);
+    $edit = array('name' => $user->getName(), 'pass' => $user->pass_raw);
     $this->drupalPostForm(NULL, $edit, t('Log in'));
 
     // Collect session id cookies.
diff --git a/core/modules/system/src/Tests/Session/SessionTest.php b/core/modules/system/src/Tests/Session/SessionTest.php
index b65ca9f..4bd9b70 100644
--- a/core/modules/system/src/Tests/Session/SessionTest.php
+++ b/core/modules/system/src/Tests/Session/SessionTest.php
@@ -58,12 +58,12 @@ function testSessionSaveRegenerate() {
     // We cannot use $this->drupalLogin($user); because we exit in
     // session_test_user_login() which breaks a normal assertion.
     $edit = array(
-      'name' => $user->getUsername(),
+      'name' => $user->getName(),
       'pass' => $user->pass_raw
     );
     $this->drupalPostForm('user', $edit, t('Log in'));
     $this->drupalGet('user');
-    $pass = $this->assertText($user->getUsername(), format_string('Found name: %name', array('%name' => $user->getUsername())), 'User login');
+    $pass = $this->assertText($user->getName(), format_string('Found name: %name', array('%name' => $user->getName())), 'User login');
     $this->_logged_in = $pass;
 
     $this->drupalGet('session-test/id');
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index ee83508..65e5900 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -1269,7 +1269,7 @@ function hook_mail($key, &$message, $params) {
   $context = $params['context'];
   $variables = array(
     '%site_name' => \Drupal::config('system.site')->get('name'),
-    '%username' => user_format_name($account),
+    '%username' => $account->getDisplayName(),
   );
   if ($context['hook'] == 'taxonomy') {
     $entity = $params['entity'];
diff --git a/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php b/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php
index 600b1d9..8cb8a50 100644
--- a/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php
+++ b/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php
@@ -24,7 +24,7 @@ public function twoFormInstances() {
     $user = $this->currentUser();
     $values = array(
       'uid' => $user->id(),
-      'name' => $user->getUsername(),
+      'name' => $user->getName(),
       'type' => 'page',
       'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
     );
diff --git a/core/modules/system/tests/modules/router_test_directory/src/TestContent.php b/core/modules/system/tests/modules/router_test_directory/src/TestContent.php
index 6559c70..3dc90d8 100644
--- a/core/modules/system/tests/modules/router_test_directory/src/TestContent.php
+++ b/core/modules/system/tests/modules/router_test_directory/src/TestContent.php
@@ -54,13 +54,13 @@ public function test1() {
    */
   public function test11() {
     $account = $this->currentUser();
-    return $account->getUsername();
+    return $account->getName();
   }
 
   public function testAccount(UserInterface $user) {
-    $current_user_name = $this->currentUser()->getUsername();
+    $current_user_name = $this->currentUser()->getName();
     $this->currentUser()->setAccount($user);
-    return $current_user_name . ':' . $user->getUsername();
+    return $current_user_name . ':' . $user->getName();
   }
 
   /**
diff --git a/core/modules/system/tests/modules/url_alter_test/src/PathProcessorTest.php b/core/modules/system/tests/modules/url_alter_test/src/PathProcessorTest.php
index 644dd49..9fe67aa 100644
--- a/core/modules/system/tests/modules/url_alter_test/src/PathProcessorTest.php
+++ b/core/modules/system/tests/modules/url_alter_test/src/PathProcessorTest.php
@@ -47,7 +47,7 @@ public function processOutbound($path, &$options = array(), Request $request = N
     if (preg_match('!^user/([0-9]+)(/.*)?!', $path, $matches)) {
       if ($account = user_load($matches[1])) {
         $matches += array(2 => '');
-        $path = 'user/' . $account->getUsername() . $matches[2];
+        $path = 'user/' . $account->getName() . $matches[2];
       }
     }
 
diff --git a/core/modules/tracker/src/Controller/TrackerUserTab.php b/core/modules/tracker/src/Controller/TrackerUserTab.php
index 49a7574..ba7853a 100644
--- a/core/modules/tracker/src/Controller/TrackerUserTab.php
+++ b/core/modules/tracker/src/Controller/TrackerUserTab.php
@@ -28,6 +28,6 @@ public function getContent(UserInterface $user) {
    * Title callback for the tracker.user_tab route.
    */
   public function getTitle(UserInterface $user) {
-    return String::checkPlain($user->getUsername());
+    return String::checkPlain($user->getName());
   }
 }
diff --git a/core/modules/user/config/install/user.mail.yml b/core/modules/user/config/install/user.mail.yml
index 436ff53..cea80f6 100644
--- a/core/modules/user/config/install/user.mail.yml
+++ b/core/modules/user/config/install/user.mail.yml
@@ -1,28 +1,28 @@
 cancel_confirm:
-  body: "[user:name],\n\nA request to cancel your account has been made at [site:name].\n\nYou may now cancel your account on [site:url-brief] by clicking this link or copying and pasting it into your browser:\n\n[user:cancel-url]\n\nNOTE: The cancellation of your account is not reversible.\n\nThis link expires in one day and nothing will happen if it is not used.\n\n--  [site:name] team"
-  subject: 'Account cancellation request for [user:name] at [site:name]'
+  body: "[user:display-name],\n\nA request to cancel your account has been made at [site:name].\n\nYou may now cancel your account on [site:url-brief] by clicking this link or copying and pasting it into your browser:\n\n[user:cancel-url]\n\nNOTE: The cancellation of your account is not reversible.\n\nThis link expires in one day and nothing will happen if it is not used.\n\n--  [site:name] team"
+  subject: 'Account cancellation request for [user:display-name] at [site:name]'
 password_reset:
-  body: "[user:name],\n\nA request to reset the password for your account has been made at [site:name].\n\nYou may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.\n\n--  [site:name] team"
-  subject: 'Replacement login information for [user:name] at [site:name]'
+  body: "[user:display-name],\n\nA request to reset the password for your account has been made at [site:name].\n\nYou may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.\n\n--  [site:name] team"
+  subject: 'Replacement login information for [user:display-name] at [site:name]'
 register_admin_created:
-  body: "[user:name],\n\nA site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n--  [site:name] team"
+  body: "[user:display-name],\n\nA site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n--  [site:name] team"
   subject: 'An administrator created an account for you at [site:name]'
 register_no_approval_required:
-  body: "[user:name],\n\nThank you for registering at [site:name]. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n--  [site:name] team"
-  subject: 'Account details for [user:name] at [site:name]'
+  body: "[user:display-name],\n\nThank you for registering at [site:name]. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n--  [site:name] team"
+  subject: 'Account details for [user:display-name] at [site:name]'
 register_pending_approval:
-  body: "[user:name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\n\n\n--  [site:name] team"
-  subject: 'Account details for [user:name] at [site:name] (pending admin approval)'
+  body: "[user:display-name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\n\n\n--  [site:name] team"
+  subject: 'Account details for [user:display-name] at [site:name] (pending admin approval)'
 register_pending_approval_admin:
-  body: "[user:name] has applied for an account.\n\n[user:edit-url]"
-  subject: 'Account details for [user:name] at [site:name] (pending admin approval)'
+  body: "[user:display-name] has applied for an account.\n\n[user:edit-url]"
+  subject: 'Account details for [user:display-name] at [site:name] (pending admin approval)'
 status_activated:
-  body: "[user:name],\n\nYour account at [site:name] has been activated.\n\nYou may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n--  [site:name] team"
-  subject: 'Account details for [user:name] at [site:name] (approved)'
+  body: "[user:display-name],\n\nYour account at [site:name] has been activated.\n\nYou may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n--  [site:name] team"
+  subject: 'Account details for [user:display-name] at [site:name] (approved)'
 status_blocked:
-  body: "[user:name],\n\nYour account on [site:name] has been blocked.\n\n--  [site:name] team"
-  subject: 'Account details for [user:name] at [site:name] (blocked)'
+  body: "[user:name],\n\nYour account on [site:display-name] has been blocked.\n\n--  [site:name] team"
+  subject: 'Account details for [user:display-name] at [site:name] (blocked)'
 status_canceled:
-  body: "[user:name],\n\nYour account on [site:name] has been canceled.\n\n--  [site:name] team"
-  subject: 'Account details for [user:name] at [site:name] (canceled)'
+  body: "[user:display-name],\n\nYour account on [site:name] has been canceled.\n\n--  [site:name] team"
+  subject: 'Account details for [user:display-name] at [site:name] (canceled)'
 langcode: en
diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php
index 4074db4..e1a393a 100644
--- a/core/modules/user/src/AccountForm.php
+++ b/core/modules/user/src/AccountForm.php
@@ -107,7 +107,7 @@ public function form(array $form, FormStateInterface $form_state) {
         'autocapitalize' => 'off',
         'spellcheck' => 'false',
       ),
-      '#default_value' => (!$register ? $account->getUsername() : ''),
+      '#default_value' => (!$register ? $account->getName() : ''),
       '#access' => ($register || ($user->id() == $account->id() && $user->hasPermission('change own username')) || $admin),
     );
 
diff --git a/core/modules/user/src/AccountSettingsForm.php b/core/modules/user/src/AccountSettingsForm.php
index 06e1a09..43ccf2a 100644
--- a/core/modules/user/src/AccountSettingsForm.php
+++ b/core/modules/user/src/AccountSettingsForm.php
@@ -183,7 +183,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
     );
     // These email tokens are shared for all settings, so just define
     // the list once to help ensure they stay in sync.
-    $email_token_help = $this->t('Available variables are: [site:name], [site:url], [user:name], [user:mail], [site:login-url], [site:url-brief], [user:edit-url], [user:one-time-login-url], [user:cancel-url].');
+    $email_token_help = $this->t('Available variables are: [site:name], [site:url], [user:display-name], [user:name], [user:mail], [site:login-url], [site:url-brief], [user:edit-url], [user:one-time-login-url], [user:cancel-url].');
 
     $form['email_admin_created'] = array(
       '#type' => 'details',
diff --git a/core/modules/user/src/Controller/UserController.php b/core/modules/user/src/Controller/UserController.php
index 2c414c1..471fe97 100644
--- a/core/modules/user/src/Controller/UserController.php
+++ b/core/modules/user/src/Controller/UserController.php
@@ -82,13 +82,13 @@ public function resetPass($uid, $timestamp, $hash) {
     if ($account->isAuthenticated()) {
       // The current user is already logged in.
       if ($account->id() == $uid) {
-        drupal_set_message($this->t('You are logged in as %user. <a href="!user_edit">Change your password.</a>', array('%user' => $account->getUsername(), '!user_edit' => $this->url('user.edit', array('user' => $account->id())))));
+        drupal_set_message($this->t('You are logged in as %user. <a href="!user_edit">Change your password.</a>', array('%user' => $account->getName(), '!user_edit' => $this->url('user.edit', array('user' => $account->id())))));
       }
       // A different user is already logged in on the computer.
       else {
         if ($reset_link_user = $this->userStorage->load($uid)) {
           drupal_set_message($this->t('Another user (%other_user) is already logged into the site on this computer, but you tried to use a one-time link for user %resetting_user. Please <a href="!logout">logout</a> and try using the link again.',
-            array('%other_user' => $account->getUsername(), '%resetting_user' => $reset_link_user->getUsername(), '!logout' => $this->url('user.logout'))));
+            array('%other_user' => $account->getName(), '%resetting_user' => $reset_link_user->getUsername(), '!logout' => $this->url('user.logout'))));
         }
         else {
           // Invalid one-time link specifies an unknown user.
@@ -161,7 +161,7 @@ public function userPage(Request $request) {
    *   The user account name.
    */
   public function userTitle(UserInterface $user = NULL) {
-    return $user ? Xss::filter($user->getUsername()) : '';
+    return $user ? Xss::filter($user->getDisplayName()) : '';
   }
 
   /**
diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php
index 307cfc2..ac3bbe0 100644
--- a/core/modules/user/src/Entity/User.php
+++ b/core/modules/user/src/Entity/User.php
@@ -414,8 +414,15 @@ public function isAnonymous() {
   /**
    * {@inheritdoc}
    */
-  public function getUsername() {
-    $name = $this->get('name')->value ?: \Drupal::config('user.settings')->get('anonymous');
+  public function getName() {
+    return $this->get('name')->value;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getDisplayName() {
+    $name = $this->getName() ?: \Drupal::config('user.settings')->get('anonymous');
     \Drupal::moduleHandler()->alter('user_format_name', $name, $this);
     return $name;
   }
diff --git a/core/modules/user/src/Form/UserPasswordResetForm.php b/core/modules/user/src/Form/UserPasswordResetForm.php
index 41c6e1a..1b50a42 100644
--- a/core/modules/user/src/Form/UserPasswordResetForm.php
+++ b/core/modules/user/src/Form/UserPasswordResetForm.php
@@ -71,11 +71,11 @@ public function getFormID() {
    */
   public function buildForm(array $form, FormStateInterface $form_state, AccountInterface $user = NULL, $expiration_date = NULL, $timestamp = NULL, $hash = NULL) {
     if ($expiration_date) {
-      $form['message'] = array('#markup' => $this->t('<p>This is a one-time login for %user_name and will expire on %expiration_date.</p><p>Click on this button to log in to the site and change your password.</p>', array('%user_name' => $user->getUsername(), '%expiration_date' => $expiration_date)));
+      $form['message'] = array('#markup' => $this->t('<p>This is a one-time login for %user_name and will expire on %expiration_date.</p><p>Click on this button to log in to the site and change your password.</p>', array('%user_name' => $user->getDisplayName(), '%expiration_date' => $expiration_date)));
     }
     else {
       // No expiration for first time login.
-      $form['message'] = array('#markup' => $this->t('<p>This is a one-time login for %user_name.</p><p>Click on this button to log in to the site and change your password.</p>', array('%user_name' => $user->getUsername())));
+      $form['message'] = array('#markup' => $this->t('<p>This is a one-time login for %user_name.</p><p>Click on this button to log in to the site and change your password.</p>', array('%user_name' => $user->getDisplayName())));
     }
 
     $form['#title'] = 'Reset Password';
@@ -103,7 +103,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
     /** @var $user \Drupal\user\UserInterface */
     $user = $form_state['values']['user'];
     user_login_finalize($user);
-    $this->logger->notice('User %name used one-time login link at time %timestamp.', array('%name' => $user->getUsername(), '%timestamp' => $form_state['values']['timestamp']));
+    $this->logger->notice('User %name used one-time login link at time %timestamp.', array('%name' => $user->getDisplayName(), '%timestamp' => $form_state['values']['timestamp']));
     drupal_set_message($this->t('You have just used your one-time login link. It is no longer necessary to use this link to log in. Please change your password.'));
     // Let the user's password be changed without the current password check.
     $token = Crypt::randomBytesBase64(55);
diff --git a/core/modules/user/src/Plugin/Search/UserSearch.php b/core/modules/user/src/Plugin/Search/UserSearch.php
index ce456b7..fe28da2 100644
--- a/core/modules/user/src/Plugin/Search/UserSearch.php
+++ b/core/modules/user/src/Plugin/Search/UserSearch.php
@@ -139,7 +139,7 @@ public function execute() {
 
     foreach ($accounts as $account) {
       $result = array(
-        'title' => $account->getUsername(),
+        'title' => $account->getDisplayName(),
         'link' => url('user/' . $account->id(), array('absolute' => TRUE)),
       );
       if ($this->currentUser->hasPermission('administer users')) {
diff --git a/core/modules/user/src/Plugin/views/field/Name.php b/core/modules/user/src/Plugin/views/field/Name.php
index 5396bc6..8af75e9 100644
--- a/core/modules/user/src/Plugin/views/field/Name.php
+++ b/core/modules/user/src/Plugin/views/field/Name.php
@@ -24,18 +24,8 @@
 class Name extends User {
 
   /**
-   * Overrides \Drupal\user\Plugin\views\field\User::init().
-   *
-   * Add uid in the query so we can test for anonymous if needed.
+   * {@inheritdoc}
    */
-  public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
-    parent::init($view, $display, $options);
-
-    if (!empty($this->options['overwrite_anonymous']) || !empty($this->options['format_username'])) {
-      $this->additional_fields['uid'] = 'uid';
-    }
-  }
-
   protected function defineOptions() {
     $options = parent::defineOptions();
 
@@ -80,26 +70,29 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    * {@inheritdoc}
    */
   protected function renderLink($data, ResultRow $values) {
-    $account = entity_create('user');
-    $account->uid = $this->getValue($values, 'uid');
-    $account->name = $this->getValue($values);
-    if (!empty($this->options['link_to_user']) || !empty($this->options['overwrite_anonymous'])) {
-      if (!empty($this->options['overwrite_anonymous']) && !$account->id()) {
-        // This is an anonymous user, and we're overriting the text.
-        return String::checkPlain($this->options['anonymous_text']);
-      }
-      elseif (!empty($this->options['link_to_user'])) {
-        $account->name = $this->getValue($values);
+    $account = $this->getEntity($values);
+
+    if (!empty($this->options['overwrite_anonymous']) && !$account->id()) {
+      // This is an anonymous user, and we're overwriting the text.
+      return String::checkPlain($this->options['anonymous_text']);
+    }
+
+    if (!empty($this->options['link_to_user'])) {
+      if (!empty($this->options['format_username'])) {
         $username = array(
           '#theme' => 'username',
           '#account' => $account,
         );
         return drupal_render($username);
       }
+      else {
+        return parent::renderLink($data, $values);
+      }
     }
+
     // If we want a formatted username, do that.
     if (!empty($this->options['format_username'])) {
-      return user_format_name($account);
+      return $account->getDisplayName();
     }
     // Otherwise, there's no special handling, so return the data directly.
     return $data;
diff --git a/core/modules/user/src/Tests/UserAdminTest.php b/core/modules/user/src/Tests/UserAdminTest.php
index b6032f5..fcb2773 100644
--- a/core/modules/user/src/Tests/UserAdminTest.php
+++ b/core/modules/user/src/Tests/UserAdminTest.php
@@ -46,33 +46,33 @@ function testUserAdmin() {
     $admin_user->save();
     $this->drupalLogin($admin_user);
     $this->drupalGet('admin/people');
-    $this->assertText($user_a->getUsername(), 'Found user A on admin users page');
-    $this->assertText($user_b->getUsername(), 'Found user B on admin users page');
-    $this->assertText($user_c->getUsername(), 'Found user C on admin users page');
-    $this->assertText($admin_user->getUsername(), 'Found Admin user on admin users page');
+    $this->assertText($user_a->getName(), 'Found user A on admin users page');
+    $this->assertText($user_b->getName(), 'Found user B on admin users page');
+    $this->assertText($user_c->getName(), 'Found user C on admin users page');
+    $this->assertText($admin_user->getName(), 'Found Admin user on admin users page');
 
     // Test for existence of edit link in table.
     $link = l(t('Edit'), "user/" . $user_a->id() . "/edit", array('query' => array('destination' => 'admin/people')));
     $this->assertRaw($link, 'Found user A edit link on admin users page');
 
     // Filter the users by name/email.
-    $this->drupalGet('admin/people', array('query' => array('user' => $user_a->getUsername())));
+    $this->drupalGet('admin/people', array('query' => array('user' => $user_a->getName())));
     $result = $this->xpath('//table/tbody/tr');
     $this->assertEqual(1, count($result), 'Filter by username returned the right amount.');
-    $this->assertEqual($user_a->getUsername(), (string) $result[0]->td[1]->span, 'Filter by username returned the right user.');
+    $this->assertEqual($user_a->getName(), (string) $result[0]->td[1]->span, 'Filter by username returned the right user.');
 
     $this->drupalGet('admin/people', array('query' => array('user' => $user_a->getEmail())));
     $result = $this->xpath('//table/tbody/tr');
     $this->assertEqual(1, count($result), 'Filter by username returned the right amount.');
-    $this->assertEqual($user_a->getUsername(), (string) $result[0]->td[1]->span, 'Filter by username returned the right user.');
+    $this->assertEqual($user_a->getName(), (string) $result[0]->td[1]->span, 'Filter by username returned the right user.');
 
     // Filter the users by permission 'administer taxonomy'.
     $this->drupalGet('admin/people', array('query' => array('permission' => 'administer taxonomy')));
 
     // Check if the correct users show up.
-    $this->assertNoText($user_a->getUsername(), 'User A not on filtered by perm admin users page');
-    $this->assertText($user_b->getUsername(), 'Found user B on filtered by perm admin users page');
-    $this->assertText($user_c->getUsername(), 'Found user C on filtered by perm admin users page');
+    $this->assertNoText($user_a->getName(), 'User A not on filtered by perm admin users page');
+    $this->assertText($user_b->getName(), 'Found user B on filtered by perm admin users page');
+    $this->assertText($user_c->getName(), 'Found user C on filtered by perm admin users page');
 
     // Filter the users by role. Grab the system-generated role name for User C.
     $roles = $user_c->getRoles();
@@ -80,9 +80,9 @@ function testUserAdmin() {
     $this->drupalGet('admin/people', array('query' => array('role' => reset($roles))));
 
     // Check if the correct users show up when filtered by role.
-    $this->assertNoText($user_a->getUsername(), 'User A not on filtered by role on admin users page');
-    $this->assertNoText($user_b->getUsername(), 'User B not on filtered by role on admin users page');
-    $this->assertText($user_c->getUsername(), 'User C on filtered by role on admin users page');
+    $this->assertNoText($user_a->getName(), 'User A not on filtered by role on admin users page');
+    $this->assertNoText($user_b->getName(), 'User B not on filtered by role on admin users page');
+    $this->assertText($user_c->getName(), 'User C on filtered by role on admin users page');
 
     // Test blocking of a user.
     $account = user_load($user_c->id());
@@ -100,9 +100,9 @@ function testUserAdmin() {
 
     // Test filtering on admin page for blocked users
     $this->drupalGet('admin/people', array('query' => array('status' => 2)));
-    $this->assertNoText($user_a->getUsername(), 'User A not on filtered by status on admin users page');
-    $this->assertNoText($user_b->getUsername(), 'User B not on filtered by status on admin users page');
-    $this->assertText($user_c->getUsername(), 'User C on filtered by status on admin users page');
+    $this->assertNoText($user_a->getName(), 'User A not on filtered by status on admin users page');
+    $this->assertNoText($user_b->getName(), 'User B not on filtered by status on admin users page');
+    $this->assertText($user_c->getName(), 'User C on filtered by status on admin users page');
 
     // Test unblocking of a user from /admin/people page and sending of activation mail
     $editunblock = array();
diff --git a/core/modules/user/src/Tests/UserBlocksTest.php b/core/modules/user/src/Tests/UserBlocksTest.php
index c0f4a3a..c459879 100644
--- a/core/modules/user/src/Tests/UserBlocksTest.php
+++ b/core/modules/user/src/Tests/UserBlocksTest.php
@@ -48,7 +48,7 @@ function testUserLoginBlock() {
 
     // Log in using the block.
     $edit = array();
-    $edit['name'] = $user->getUsername();
+    $edit['name'] = $user->getName();
     $edit['pass'] = $user->pass_raw;
     $this->drupalPostForm('admin/people/permissions', $edit, t('Log in'));
     $this->assertNoText(t('User login'), 'Logged in.');
@@ -95,10 +95,10 @@ function testWhosOnlineBlock() {
     $content = entity_view($block, 'block');
     $this->drupalSetContent(render($content));
     $this->assertRaw(t('2 users'), 'Correct number of online users (2 users).');
-    $this->assertText($user1->getUsername(), 'Active user 1 found in online list.');
-    $this->assertText($user2->getUsername(), 'Active user 2 found in online list.');
-    $this->assertNoText($user3->getUsername(), 'Inactive user not found in online list.');
-    $this->assertTrue(strpos($this->drupalGetContent(), $user1->getUsername()) > strpos($this->drupalGetContent(), $user2->getUsername()), 'Online users are ordered correctly.');
+    $this->assertText($user1->getName(), 'Active user 1 found in online list.');
+    $this->assertText($user2->getName(), 'Active user 2 found in online list.');
+    $this->assertNoText($user3->getName(), 'Inactive user not found in online list.');
+    $this->assertTrue(strpos($this->drupalGetContent(), $user1->getName()) > strpos($this->drupalGetContent(), $user2->getName()), 'Online users are ordered correctly.');
   }
 
   /**
diff --git a/core/modules/user/src/Tests/UserCancelTest.php b/core/modules/user/src/Tests/UserCancelTest.php
index 2b21c18..82e43e6 100644
--- a/core/modules/user/src/Tests/UserCancelTest.php
+++ b/core/modules/user/src/Tests/UserCancelTest.php
@@ -175,7 +175,7 @@ function testUserBlock() {
     $this->assertTrue($account->isBlocked(), 'User has been blocked.');
 
     // Confirm that the confirmation message made it through to the end user.
-    $this->assertRaw(t('%name has been disabled.', array('%name' => $account->getUsername())), "Confirmation message displayed to user.");
+    $this->assertRaw(t('%name has been disabled.', array('%name' => $account->getName())), "Confirmation message displayed to user.");
   }
 
   /**
@@ -240,7 +240,7 @@ function testUserBlockUnpublish() {
     $this->assertFalse($comment->isPublished(), 'Comment of the user has been unpublished.');
 
     // Confirm that the confirmation message made it through to the end user.
-    $this->assertRaw(t('%name has been disabled.', array('%name' => $account->getUsername())), "Confirmation message displayed to user.");
+    $this->assertRaw(t('%name has been disabled.', array('%name' => $account->getName())), "Confirmation message displayed to user.");
   }
 
   /**
@@ -291,7 +291,7 @@ function testUserAnonymize() {
     $this->assertTrue(($test_node->getOwnerId() != 0 && $test_node->isPublished()), "Current revision of the user's node was not attributed to anonymous user.");
 
     // Confirm that the confirmation message made it through to the end user.
-    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->getUsername())), "Confirmation message displayed to user.");
+    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->getName())), "Confirmation message displayed to user.");
   }
 
   /**
@@ -356,7 +356,7 @@ function testUserDelete() {
     $this->assertFalse(Comment::load($comment->id()), 'Comment of the user has been deleted.');
 
     // Confirm that the confirmation message made it through to the end user.
-    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->getUsername())), "Confirmation message displayed to user.");
+    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->getName())), "Confirmation message displayed to user.");
   }
 
   /**
@@ -375,12 +375,12 @@ function testUserCancelByAdmin() {
     // Delete regular user.
     $this->drupalGet('user/' . $account->id() . '/edit');
     $this->drupalPostForm(NULL, NULL, t('Cancel account'));
-    $this->assertRaw(t('Are you sure you want to cancel the account %name?', array('%name' => $account->getUsername())), 'Confirmation form to cancel account displayed.');
+    $this->assertRaw(t('Are you sure you want to cancel the account %name?', array('%name' => $account->getName())), 'Confirmation form to cancel account displayed.');
     $this->assertText(t('Select the method to cancel the account above.'), 'Allows to select account cancellation method.');
 
     // Confirm deletion.
     $this->drupalPostForm(NULL, NULL, t('Cancel account'));
-    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->getUsername())), 'User deleted.');
+    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->getName())), 'User deleted.');
     $this->assertFalse(user_load($account->id()), 'User is not found in the database.');
   }
 
@@ -403,12 +403,12 @@ function testUserWithoutEmailCancelByAdmin() {
     // Delete regular user without email address.
     $this->drupalGet('user/' . $account->id() . '/edit');
     $this->drupalPostForm(NULL, NULL, t('Cancel account'));
-    $this->assertRaw(t('Are you sure you want to cancel the account %name?', array('%name' => $account->getUsername())), 'Confirmation form to cancel account displayed.');
+    $this->assertRaw(t('Are you sure you want to cancel the account %name?', array('%name' => $account->getName())), 'Confirmation form to cancel account displayed.');
     $this->assertText(t('Select the method to cancel the account above.'), 'Allows to select account cancellation method.');
 
     // Confirm deletion.
     $this->drupalPostForm(NULL, NULL, t('Cancel account'));
-    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->getUsername())), 'User deleted.');
+    $this->assertRaw(t('%name has been deleted.', array('%name' => $account->getName())), 'User deleted.');
     $this->assertFalse(user_load($account->id()), 'User is not found in the database.');
   }
 
diff --git a/core/modules/user/src/Tests/UserEditTest.php b/core/modules/user/src/Tests/UserEditTest.php
index 68747a1..f9ae087 100644
--- a/core/modules/user/src/Tests/UserEditTest.php
+++ b/core/modules/user/src/Tests/UserEditTest.php
@@ -26,7 +26,7 @@ function testUserEdit() {
     $this->drupalLogin($user1);
 
     // Test that error message appears when attempting to use a non-unique user name.
-    $edit['name'] = $user2->getUsername();
+    $edit['name'] = $user2->getName();
     $this->drupalPostForm("user/" . $user1->id() . "/edit", $edit, t('Save'));
     $this->assertRaw(t('The name %name is already taken.', array('%name' => $edit['name'])));
 
diff --git a/core/modules/user/src/Tests/UserEditedOwnAccountTest.php b/core/modules/user/src/Tests/UserEditedOwnAccountTest.php
index 64ebf4e..b3ecb41 100644
--- a/core/modules/user/src/Tests/UserEditedOwnAccountTest.php
+++ b/core/modules/user/src/Tests/UserEditedOwnAccountTest.php
@@ -16,6 +16,13 @@
  */
 class UserEditedOwnAccountTest extends WebTestBase {
 
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('user_form_test');
+
   function testUserEditedOwnAccount() {
     // Change account setting 'Who can register accounts?' to Administrators
     // only.
diff --git a/core/modules/user/src/Tests/UserEntityCallbacksTest.php b/core/modules/user/src/Tests/UserEntityCallbacksTest.php
index b2f21c0..8c117f6 100644
--- a/core/modules/user/src/Tests/UserEntityCallbacksTest.php
+++ b/core/modules/user/src/Tests/UserEntityCallbacksTest.php
@@ -22,13 +22,18 @@ class UserEntityCallbacksTest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array('user');
+  public static $modules = array('user', 'user_name_test');
 
   /**
    * @var \Drupal\user\UserInterface
    */
   protected $account;
 
+  /**
+   * @var \Drupal\user\UserInterface
+   */
+  protected $anonymous;
+
   function setUp() {
     parent::setUp();
 
@@ -40,12 +45,19 @@ function setUp() {
    * Test label callback.
    */
   function testLabelCallback() {
-    $this->assertEqual($this->account->label(), $this->account->getUsername(), 'The username should be used as label');
+    $this->assertEqual($this->account->label(), $this->account->getName(), 'The username should be used as label');
 
     // Setup a random anonymous name to be sure the name is used.
     $name = $this->randomName();
     \Drupal::config('user.settings')->set('anonymous', $name)->save();
     $this->assertEqual($this->anonymous->label(), $name, 'The variable anonymous should be used for name of uid 0');
+    $this->assertEqual($this->anonymous->getName(), '', 'The raw anonymous user name should be empty string');
+
+    // Set to test the altered username.
+    \Drupal::state()->set('user_name_test_altered_name', 'altered');
+
+    $this->assertEqual($this->account->getDisplayName(), $this->account->name->value . 'altered', 'The user display name should be altered.');
+    $this->assertEqual($this->account->getName(), $this->account->name->value, 'The user name should not be altered.');
   }
 
   /**
diff --git a/core/modules/user/src/Tests/UserLoginTest.php b/core/modules/user/src/Tests/UserLoginTest.php
index 15fd7ce..22fb712 100644
--- a/core/modules/user/src/Tests/UserLoginTest.php
+++ b/core/modules/user/src/Tests/UserLoginTest.php
@@ -22,7 +22,7 @@ class UserLoginTest extends WebTestBase {
   function testLoginDestination() {
     $user = $this->drupalCreateUser(array());
     $this->drupalGet('user', array('query' => array('destination' => 'foo')));
-    $edit = array('name' => $user->getUserName(), 'pass' => $user->pass_raw);
+    $edit = array('name' => $user->getName(), 'pass' => $user->pass_raw);
     $this->drupalPostForm(NULL, $edit, t('Log in'));
     $expected = url('foo', array('absolute' => TRUE));
     $this->assertEqual($this->getUrl(), $expected, 'Redirected to the correct URL');
diff --git a/core/modules/user/src/Tests/UserPasswordResetTest.php b/core/modules/user/src/Tests/UserPasswordResetTest.php
index 1045e2c..406c4f7 100644
--- a/core/modules/user/src/Tests/UserPasswordResetTest.php
+++ b/core/modules/user/src/Tests/UserPasswordResetTest.php
@@ -57,25 +57,25 @@ function testUserPasswordReset() {
     $this->assertEqual(count($this->drupalGetMails(array('id' => 'user_password_reset'))), 0, 'No email was sent when requesting a password for an invalid account.');
 
     // Reset the password by username via the password reset page.
-    $edit['name'] = $this->account->getUsername();
+    $edit['name'] = $this->account->getName();
     $this->drupalPostForm(NULL, $edit, t('Email new password'));
 
      // Verify that the user was sent an email.
     $this->assertMail('to', $this->account->getEmail(), 'Password email sent to user.');
-    $subject = t('Replacement login information for @username at @site', array('@username' => $this->account->getUsername(), '@site' => \Drupal::config('system.site')->get('name')));
+    $subject = t('Replacement login information for @username at @site', array('@username' => $this->account->getName(), '@site' => \Drupal::config('system.site')->get('name')));
     $this->assertMail('subject', $subject, 'Password reset email subject is correct.');
 
     $resetURL = $this->getResetURL();
     $this->drupalGet($resetURL);
 
     // Check the one-time login page.
-    $this->assertText($this->account->getUsername(), 'One-time login page contains the correct username.');
+    $this->assertText($this->account->getName(), 'One-time login page contains the correct username.');
     $this->assertText(t('This login can be used only once.'), 'Found warning about one-time login.');
 
     // Check successful login.
     $this->drupalPostForm(NULL, NULL, t('Log in'));
     $this->assertLink(t('Log out'));
-    $this->assertTitle(t('@name | @site', array('@name' => $this->account->getUsername(), '@site' => \Drupal::config('system.site')->get('name'))), 'Logged in using password reset link.');
+    $this->assertTitle(t('@name | @site', array('@name' => $this->account->getName(), '@site' => \Drupal::config('system.site')->get('name'))), 'Logged in using password reset link.');
 
     // Change the forgotten password.
     $password = user_password();
diff --git a/core/modules/user/src/Tests/UserSearchTest.php b/core/modules/user/src/Tests/UserSearchTest.php
index cbb2628..fd033ae 100644
--- a/core/modules/user/src/Tests/UserSearchTest.php
+++ b/core/modules/user/src/Tests/UserSearchTest.php
@@ -42,7 +42,7 @@ function testUserSearch() {
     $this->assertText('no results', 'Non-matching search gave appropriate message');
 
     // Verify that a user with search permission can search for users by name.
-    $keys = $user1->getUsername();
+    $keys = $user1->getName();
     $edit = array('keys' => $keys);
     $this->drupalPostForm('search/user', $edit, t('Search'));
     $this->assertLink($keys, 0, 'Search by user name worked for non-admin user');
@@ -61,17 +61,17 @@ function testUserSearch() {
     $edit = array('keys' => $keys);
     $this->drupalPostForm('search/user', $edit, t('Search'));
     $this->assertText($keys, 'Search by email works for administrative user');
-    $this->assertText($user2->getUsername(), 'Search by email resulted in user name on page for administrative user');
+    $this->assertText($user2->getName(), 'Search by email resulted in user name on page for administrative user');
 
     // Verify that a substring works too for email.
     $subkey = substr($keys, 1, 5);
     $edit = array('keys' => $subkey);
     $this->drupalPostForm('search/user', $edit, t('Search'));
     $this->assertText($keys, 'Search by email substring works for administrative user');
-    $this->assertText($user2->getUsername(), 'Search by email substring resulted in user name on page for administrative user');
+    $this->assertText($user2->getName(), 'Search by email substring resulted in user name on page for administrative user');
 
     // Verify that if they search by user name, they see email address too.
-    $keys = $user1->getUsername();
+    $keys = $user1->getName();
     $edit = array('keys' => $keys);
     $this->drupalPostForm('search/user', $edit, t('Search'));
     $this->assertText($keys, 'Search by user name works for admin user');
@@ -84,16 +84,16 @@ function testUserSearch() {
 
     // Verify that users with "administer users" permissions can see blocked
     // accounts in search results.
-    $edit = array('keys' => $blocked_user->getUsername());
+    $edit = array('keys' => $blocked_user->getName());
     $this->drupalPostForm('search/user', $edit, t('Search'));
-    $this->assertText($blocked_user->getUsername(), 'Blocked users are listed on the user search results for users with the "administer users" permission.');
+    $this->assertText($blocked_user->getName(), 'Blocked users are listed on the user search results for users with the "administer users" permission.');
 
     // Verify that users without "administer users" permissions do not see
     // blocked accounts in search results.
     $this->drupalLogin($user1);
-    $edit = array('keys' => $blocked_user->getUsername());
+    $edit = array('keys' => $blocked_user->getName());
     $this->drupalPostForm('search/user', $edit, t('Search'));
-    $this->assertNoText($blocked_user->getUsername(), 'Blocked users are hidden from the user search results.');
+    $this->assertNoText($blocked_user->getName(), 'Blocked users are hidden from the user search results.');
 
     // Create a user without search permission, and one without user page view
     // permission. Verify that neither one can access the user search page.
diff --git a/core/modules/user/src/Tests/UserTokenReplaceTest.php b/core/modules/user/src/Tests/UserTokenReplaceTest.php
index fa5ac1b..6df199f 100644
--- a/core/modules/user/src/Tests/UserTokenReplaceTest.php
+++ b/core/modules/user/src/Tests/UserTokenReplaceTest.php
@@ -58,7 +58,8 @@ function testUserTokenReplacement() {
     // Generate and test sanitized tokens.
     $tests = array();
     $tests['[user:uid]'] = $account->id();
-    $tests['[user:name]'] = String::checkPlain(user_format_name($account));
+    $tests['[user:display-name]'] = String::checkPlain($account->getDisplayName());
+    $tests['[user:name]'] = String::checkPlain($account->getName());
     $tests['[user:mail]'] = String::checkPlain($account->getEmail());
     $tests['[user:url]'] = url("user/" . $account->id(), $url_options);
     $tests['[user:edit-url]'] = url("user/" . $account->id() . "/edit", $url_options);
@@ -66,7 +67,8 @@ function testUserTokenReplacement() {
     $tests['[user:last-login:short]'] = format_date($account->getLastLoginTime(), 'short', '', NULL, $language_interface->id);
     $tests['[user:created]'] = format_date($account->getCreatedTime(), 'medium', '', NULL, $language_interface->id);
     $tests['[user:created:short]'] = format_date($account->getCreatedTime(), 'short', '', NULL, $language_interface->id);
-    $tests['[current-user:name]'] = String::checkPlain(user_format_name($global_account));
+    $tests['[current-user:display-name]'] = String::checkPlain($global_account->getDisplayName());
+    $tests['[current-user:name]'] = String::checkPlain($global_account->getName());
 
     // Test to make sure that we generated something for each token.
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
@@ -77,9 +79,11 @@ function testUserTokenReplacement() {
     }
 
     // Generate and test unsanitized tokens.
-    $tests['[user:name]'] = user_format_name($account);
+    $tests['[user:display-name]'] = $account->getDisplayName();
+    $tests['[user:name]'] = $account->getName();
     $tests['[user:mail]'] = $account->getEmail();
-    $tests['[current-user:name]'] = user_format_name($global_account);
+    $tests['[current-user:display-name]'] = $global_account->getDisplayName();
+    $tests['[current-user:name]'] = $global_account->getName();
 
     foreach ($tests as $input => $expected) {
       $output = $token_service->replace($input, array('user' => $account), array('langcode' => $language_interface->id, 'sanitize' => FALSE));
diff --git a/core/modules/user/src/Tests/Views/HandlerFieldUserNameTest.php b/core/modules/user/src/Tests/Views/HandlerFieldUserNameTest.php
index f28b7d8..575e875 100644
--- a/core/modules/user/src/Tests/Views/HandlerFieldUserNameTest.php
+++ b/core/modules/user/src/Tests/Views/HandlerFieldUserNameTest.php
@@ -25,29 +25,27 @@ class HandlerFieldUserNameTest extends UserTestBase {
   public static $testViews = array('test_views_handler_field_user_name');
 
   public function testUserName() {
-    $this->drupalLogin($this->drupalCreateUser(array('access user profiles')));
+    $new_user = $this->drupalCreateUser(array('access user profiles'));
+    $this->drupalLogin($new_user);
 
     $view = Views::getView('test_views_handler_field_user_name');
     $this->executeView($view);
 
-    $view->row_index = 0;
-
     $view->field['name']->options['link_to_user'] = TRUE;
-    $username = $view->result[0]->users_name = $this->randomName();
-    $view->result[0]->uid = 1;
-    $render = $view->field['name']->advancedRender($view->result[0]);
+    $username = $view->result[3]->users_name;
+    $render = $view->field['name']->advancedRender($view->result[3]);
     $this->assertTrue(strpos($render, $username) !== FALSE, 'If link to user is checked the username should be part of the output.');
-    $this->assertTrue(strpos($render, 'user/1') !== FALSE, 'If link to user is checked the link to the user should appear as well.');
+    $this->assertTrue(strpos($render, 'user/' . $new_user->id()) !== FALSE, 'If link to user is checked the link to the user should appear as well.');
+
+    $view->destroy();
+    $this->executeView($view);
 
     $view->field['name']->options['link_to_user'] = FALSE;
-    $username = $view->result[0]->users_name = $this->randomName();
-    $view->result[0]->uid = 1;
-    $render = $view->field['name']->advancedRender($view->result[0]);
+    $username = $view->result[2]->users_name;
+    $render = $view->field['name']->advancedRender($view->result[2]);
     $this->assertIdentical($render, $username, 'If the user is not linked the username should be printed out for a normal user.');
 
-    $view->result[0]->uid = 0;
     $anon_name = \Drupal::config('user.settings')->get('anonymous');
-    $view->result[0]->users_name = '';
     $render = $view->field['name']->advancedRender($view->result[0]);
     $this->assertIdentical($render, $anon_name , 'For user0 it should use the default anonymous name by default.');
 
diff --git a/core/modules/user/src/UserAutocomplete.php b/core/modules/user/src/UserAutocomplete.php
index cb75d5b..f180041 100644
--- a/core/modules/user/src/UserAutocomplete.php
+++ b/core/modules/user/src/UserAutocomplete.php
@@ -84,7 +84,7 @@ public function getMatches($string, $include_anonymous = FALSE) {
 
       $controller = $this->entityManager->getStorage('user');
       foreach ($controller->loadMultiple($uids) as $account) {
-        $matches[] = array('value' => $account->getUsername(), 'label' => String::checkPlain($account->getUsername()));
+        $matches[] = array('value' => $account->getUsername(), 'label' => String::checkPlain($account->getDisplayName()));
       }
     }
 
diff --git a/core/modules/user/tests/modules/user_name_test/user_name_test.info.yml b/core/modules/user/tests/modules/user_name_test/user_name_test.info.yml
new file mode 100644
index 0000000..8a5e1cc
--- /dev/null
+++ b/core/modules/user/tests/modules/user_name_test/user_name_test.info.yml
@@ -0,0 +1,7 @@
+name: 'User name tests'
+type: module
+description: 'Support module for user name testing.'
+package: Testing
+version: VERSION
+core: 8.x
+hidden: true
diff --git a/core/modules/user/tests/modules/user_name_test/user_name_test.module b/core/modules/user/tests/modules/user_name_test/user_name_test.module
new file mode 100644
index 0000000..3603465
--- /dev/null
+++ b/core/modules/user/tests/modules/user_name_test/user_name_test.module
@@ -0,0 +1,12 @@
+<?php
+/**
+ * @file
+ * User name tests bootstrap file.
+ */
+
+/**
+ * Implements hook_user_format_name_alter().
+ */
+function user_name_test_user_format_name_alter(&$name, $account) {
+  $name .= \Drupal::state()->get('user_name_test_altered_name');
+}
diff --git a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_user_name.yml b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_user_name.yml
index 8011988..3679626 100644
--- a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_user_name.yml
+++ b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_user_name.yml
@@ -42,6 +42,13 @@ display:
         type: default
       row:
         type: fields
+      sorts:
+        uid:
+          id: uid
+          table: users
+          field: uid
+          plugin_id: standard
+          provider: views
     display_plugin: default
     display_title: Master
     id: default
diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php
index 34e9f7f..9baa8b4 100644
--- a/core/modules/user/user.api.php
+++ b/core/modules/user/user.api.php
@@ -107,17 +107,17 @@ function hook_user_cancel_methods_alter(&$methods) {
 /**
  * Alter the username that is displayed for a user.
  *
- * Called by user_format_name() to allow modules to alter the username that's
+ * Called by $user->getDisplayName() 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 user_format_name() will return.
+ *   The string that $user->getDisplayName() will return.
  *
  * @param $account
- *   The account object passed to user_format_name().
+ *   The account object.
  *
- * @see user_format_name()
+ * @see $account->getDisplayName()
  */
 function hook_user_format_name_alter(&$name, $account) {
   // Display the user's uid instead of name.
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index c23cc2c..136b5ed 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -540,10 +540,10 @@ function user_preprocess_block(&$variables) {
  *   is called on it before it is printed to the page.
  *
  * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
- *   Use \Drupal\Core\Session\Interface::getUsername().
+ *   Use \Drupal\Core\Session\AccountInterface::getDisplayName().
  */
 function user_format_name(AccountInterface $account) {
-  return $account->getUsername();
+  return $account->getDisplayName();
 }
 
 /**
@@ -599,7 +599,8 @@ 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'] = $account->getUsername();
+  $name  = $account->getDisplayName();
+  $variables['name_raw'] = $account->getName();
   if (drupal_strlen($name) > 20) {
     $name = Unicode::truncate($name, 15, FALSE, TRUE);
     $variables['truncated'] = TRUE;
@@ -662,7 +663,7 @@ function user_menu_breadcrumb_alter(&$active_trail, $item) {
 function user_login_finalize(UserInterface $account) {
   global $user;
   $user = $account;
-  \Drupal::logger('user')->notice('Session opened for %name.', array('%name' => $account->getUsername()));
+  \Drupal::logger('user')->notice('Session opened for %name.', array('%name' => $account->getName()));
   // Update the user table timestamp noting user has logged in.
   // This is also used to invalidate one-time login links.
   $account->setLastLoginTime(REQUEST_TIME);
@@ -858,8 +859,8 @@ function _user_cancel($edit, $account, $method) {
       }
       $account->block();
       $account->save();
-      drupal_set_message(t('%name has been disabled.', array('%name' => $account->getUsername())));
-      $logger->notice('Blocked user: %name %email.', array('%name' => $account->getUsername(), '%email' => '<' . $account->getEmail() . '>'));
+      drupal_set_message(t('%name has been disabled.', array('%name' => $account->getDisplayName())));
+      $logger->notice('Blocked user: %name %email.', array('%name' => $account->getDisplayName(), '%email' => '<' . $account->getEmail() . '>'));
       break;
 
     case 'user_cancel_reassign':
@@ -869,8 +870,8 @@ function _user_cancel($edit, $account, $method) {
         _user_mail_notify('status_canceled', $account);
       }
       $account->delete();
-      drupal_set_message(t('%name has been deleted.', array('%name' => $account->getUsername())));
-      $logger->notice('Deleted user: %name %email.', array('%name' => $account->getUsername(), '%email' => '<' . $account->getEmail() . '>'));
+      drupal_set_message(t('%name has been deleted.', array('%name' => $account->getDisplayName())));
+      $logger->notice('Deleted user: %name %email.', array('%name' => $account->getDisplayName(), '%email' => '<' . $account->getEmail() . '>'));
       break;
   }
 
@@ -1394,7 +1395,7 @@ function user_form_process_password_confirm($element) {
       'fair' => t('Fair'),
       'good' => t('Good'),
       'strong' => t('Strong'),
-      'username' => \Drupal::currentUser()->getUsername(),
+      'username' => \Drupal::currentUser()->getName(),
     );
   }
 
@@ -1511,7 +1512,7 @@ function user_toolbar() {
     '#type' => 'toolbar_item',
     'tab' => array(
       '#type' => 'link',
-      '#title' => $user->getUsername(),
+      '#title' => $user->getDisplayName(),
       '#href' => 'user',
       '#attributes' => array(
         'title' => t('My account'),
@@ -1545,7 +1546,7 @@ function user_toolbar() {
 function user_logout() {
   $user = \Drupal::currentUser();
 
-  \Drupal::logger('user')->notice('Session closed for %name.', array('%name' => $user->getUsername()));
+  \Drupal::logger('user')->notice('Session closed for %name.', array('%name' => $user->getDisplayName()));
 
   \Drupal::moduleHandler()->invokeAll('user_logout', array($user));
 
diff --git a/core/modules/user/user.tokens.inc b/core/modules/user/user.tokens.inc
index 51579be..dfe8966 100644
--- a/core/modules/user/user.tokens.inc
+++ b/core/modules/user/user.tokens.inc
@@ -27,7 +27,11 @@ function user_token_info() {
     'description' => t("The unique ID of the user account."),
   );
   $user['name'] = array(
-    'name' => t("Name"),
+    'name' => t("Display Name"),
+    'description' => t("The display name of the user account."),
+  );
+  $user['username'] = array(
+    'name' => t("Login Name"),
     'description' => t("The login name of the user account."),
   );
   $user['mail'] = array(
@@ -88,11 +92,16 @@ function user_tokens($type, $tokens, array $data = array(), array $options = arr
           $replacements[$original] = $account->id() ?: t('not yet assigned');
           break;
 
-        case 'name':
-          $name = user_format_name($account);
+        case 'display-name':
+          $name = $account->getDisplayName();
           $replacements[$original] = $sanitize ? String::checkPlain($name) : $name;
           break;
 
+        case 'name':
+          $username = $account->getUsername();
+          $replacements[$original] = $sanitize ? String::checkPlain($username) : $username;
+          break;
+
         case 'mail':
           $replacements[$original] = $sanitize ? String::checkPlain($account->getEmail()) : $account->getEmail();
           break;
diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme
index 18652ad..87f85e3 100644
--- a/core/themes/seven/seven.theme
+++ b/core/themes/seven/seven.theme
@@ -294,7 +294,7 @@ function seven_form_node_form_alter(&$form, FormStateInterface $form_state) {
     'author' => array(
       '#type' => 'item',
       '#wrapper_attributes' => array('class' => array('author', 'container-inline')),
-      '#markup' => '<h4 class="label inline">' . t('Author') . '</h4> ' . $node->getOwner()->getUsername(),
+      '#markup' => '<h4 class="label inline">' . t('Author') . '</h4> ' . $node->getOwner()->getName(),
     ),
   );
   $form['revision_information']['#type'] = 'container';
