You are here

function hook_event_dispatcher_user_login in Hook Event Dispatcher 8

Implements hook_user_login().

1 call to hook_event_dispatcher_user_login()
UserEventTest::testUserLoginEvent in tests/src/Unit/User/UserEventTest.php
User login event test.

File

./hook_event_dispatcher.module, line 738
Hook event dispatcher module.

Code

function hook_event_dispatcher_user_login(AccountInterface $account) {

  /** @var \Drupal\hook_event_dispatcher\Manager\HookEventDispatcherManagerInterface $manager */
  $manager = \Drupal::service('hook_event_dispatcher.manager');
  $event = new UserLoginEvent($account);
  $manager
    ->register($event);
}