diff --git a/core/modules/jsonapi/src/Controller/EntryPoint.php b/core/modules/jsonapi/src/Controller/EntryPoint.php index 4f98708fb3fc88185839234759bb99b711ae8e52..a564580523cdb1b4af5d2415b94af5ee85728e89 100644 --- a/core/modules/jsonapi/src/Controller/EntryPoint.php +++ b/core/modules/jsonapi/src/Controller/EntryPoint.php @@ -14,7 +14,6 @@ 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 @@ public function index() { $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 {