function UserRequestSubscriber::getSubscribedEvents

File

core/modules/user/src/EventSubscriber/UserRequestSubscriber.php, line 62

Class

UserRequestSubscriber
Updates the current user's last access time.

Namespace

Drupal\user\EventSubscriber

Code

public static function getSubscribedEvents() {
  // Should go before other subscribers start to write their caches. Notably
  // before \Drupal\Core\EventSubscriber\KernelDestructionSubscriber to
  // prevent instantiation of destructed services.
  $events[KernelEvents::TERMINATE][] = [
    'onKernelTerminate',
    300,
  ];
  return $events;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.