diff --git a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php index 1cf937c..b3033ff 100644 --- a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php +++ b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php @@ -88,6 +88,10 @@ public function getContext() { public function matchRequest(Request $request) { $parameters = $this->chainRouter->matchRequest($request); $request->attributes->add($parameters); + // Trigger a session start and authentication by accessing any property of + // the current user. + // @todo: This can will be removed in #2229145. + $this->account->id(); $this->checkAccess($request); // We can not return $parameters because the access check can change the // request attributes.