diff --git a/core/modules/user/src/Plugin/views/field/Name.php b/core/modules/user/src/Plugin/views/field/Name.php
index 0d5a768..40370c9 100644
--- a/core/modules/user/src/Plugin/views/field/Name.php
+++ b/core/modules/user/src/Plugin/views/field/Name.php
@@ -81,25 +81,23 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    */
   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);
+    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']) || !empty($this->options['format_username'])) {
+      $account->uid = $this->getValue($values, 'uid');
+      $account->name = $this->getValue($values);
+      if (!empty($this->options['link_to_user'])) {
         $username = array(
           '#theme' => 'username',
           '#account' => $account,
         );
         return drupal_render($username);
       }
-    }
-    // If we want a formatted username, do that.
-    if (!empty($this->options['format_username'])) {
-      return user_format_name($account);
+      if (!empty($this->options['format_username'])) {
+        return user_format_name($account);
+      }
     }
     // Otherwise, there's no special handling, so return the data directly.
     return $data;
