public function UserLogin::processRoute in Services 9.0.x
Same name and namespace in other branches
- 8.4 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\ServiceDefinitionCode
public function processRoute(Route $route) {
$route
->setRequirement('_user_is_logged_in', 'FALSE');
}