You are here

public function UserLogin::processRoute in Services 8.4

Same name and namespace in other branches
  1. 9.0.x src/Plugin/ServiceDefinition/UserLogin.php \Drupal\services\Plugin\ServiceDefinition\UserLogin::processRoute()

Checks access for the ServiceDefintion.

Parameters

\Symfony\Component\Routing\Route $route: The route match object.

Overrides ServiceDefinitionBase::processRoute

File

src/Plugin/ServiceDefinition/UserLogin.php, line 78

Class

UserLogin
Plugin annotation @ServiceDefinition( id = "user_login", methods = { "POST" }, title = @Translation("User login"), description = @Translation("Allows users to login."), category = @Translation("User"), path = "user/login" )

Namespace

Drupal\services\Plugin\ServiceDefinition

Code

public function processRoute(Route $route) {
  $route
    ->setRequirement('_user_is_logged_in', 'FALSE');
}