diff --git a/core/modules/jsonapi/src/Controller/EntryPoint.php b/core/modules/jsonapi/src/Controller/EntryPoint.php index 4f98708fb3f..a564580523c 100644 --- a/core/modules/jsonapi/src/Controller/EntryPoint.php +++ b/core/modules/jsonapi/src/Controller/EntryPoint.php @@ -14,7 +14,6 @@ use Drupal\jsonapi\JsonApiResource\ResourceObjectData; use Drupal\jsonapi\ResourceResponse; use Drupal\jsonapi\ResourceType\ResourceType; use Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface; -use Drupal\user\Entity\User; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Routing\Exception\RouteNotFoundException; @@ -104,7 +103,7 @@ class EntryPoint extends ControllerBase { $meta = []; if ($this->user->isAuthenticated()) { - $current_user_uuid = User::load($this->user->id())->uuid(); + $current_user_uuid = $this->entityTypeManager()->getStorage('user')->load($this->user->id())->uuid(); $meta['links']['me'] = ['meta' => ['id' => $current_user_uuid]]; $cacheability->addCacheContexts(['user']); try {