diff -u b/core/modules/user/src/UserAccessControlHandler.php b/core/modules/user/src/UserAccessControlHandler.php --- b/core/modules/user/src/UserAccessControlHandler.php +++ b/core/modules/user/src/UserAccessControlHandler.php @@ -81,13 +81,10 @@ switch ($field_definition->getName()) { case 'name': // Allow view access to anyone with access to the entity. - // Anonymous users should be able to change their usernamae + // Anonymous users should be able to change their username. if ($operation == 'view' || ($items && $account->isAnonymous() && $items->getEntity()->isAnonymous())) { return AccessResult::allowed()->cachePerPermissions(); } - if ($account->isAnonymous()) { - return AccessResult::allowed(); - } // Allow edit access for the own user name if the permission is // satisfied. if ($is_own_account && $account->hasPermission('change own username')) {