public function LoginStatusCheck::access

Checks for access to route.

Parameters

\Symfony\Component\Routing\Route $route: The route to check against.

\Symfony\Component\HttpFoundation\Request $request: The request object.

Return value

mixed TRUE if access is allowed. FALSE if not. NULL if no opinion.

Overrides AccessCheckInterface::access

File

drupal/core/modules/user/lib/Drupal/user/Access/LoginStatusCheck.php, line 29
Contains \Drupal\user\Access\LoginStatusCheck.

Class

LoginStatusCheck
Determines access to routes based on login status of current user.

Namespace

Drupal\user\Access

Code

public function access(Route $route, Request $request) {
  return (bool) $GLOBALS['user']->uid;
}