public AuthenticationSubscriber::onKernelRequestAuthenticate(GetResponseEvent $event)
Authenticates user on request.
\Symfony\Component\HttpKernel\Event\GetResponseEvent $event: The request event.
\Drupal\Core\Authentication\AuthenticationProviderInterface::authenticate()
public function onKernelRequestAuthenticate(GetResponseEvent $event) { if ($event->getRequestType() === HttpKernelInterface::MASTER_REQUEST) { $request = $event->getRequest(); if ($this->authenticationProvider->applies($request)) { $account = $this->authenticationProvider->authenticate($request); if ($account) { $this->accountProxy->setAccount($account); return; } } // No account has been set explicitly, initialize the timezone here. date_default_timezone_set(drupal_get_user_timezone()); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!EventSubscriber!AuthenticationSubscriber.php/function/AuthenticationSubscriber::onKernelRequestAuthenticate/8.1.x