function rules_user_logout
Same name in other branches
- 7.x-2.x modules/events.inc \rules_user_logout()
Implements hook_user_logout().
2 calls to rules_user_logout()
- EventIntegrationTest::testMultipleEvents in tests/
src/ Kernel/ EventIntegrationTest.php - Test that rules config supports multiple events.
- EventIntegrationTest::testUserLogoutEvent in tests/
src/ Kernel/ EventIntegrationTest.php - Test that the user logout hook triggers the Rules event listener.
3 string references to 'rules_user_logout'
- EventIntegrationTest::testMultipleEvents in tests/
src/ Kernel/ EventIntegrationTest.php - Test that rules config supports multiple events.
- EventIntegrationTest::testUserLogoutEvent in tests/
src/ Kernel/ EventIntegrationTest.php - Test that the user logout hook triggers the Rules event listener.
- UserLogoutTest::testUserLogoutEvent in tests/
src/ Unit/ Integration/ Event/ UserLogoutTest.php - Tests the event metadata.
File
-
./
rules.module, line 109
Code
function rules_user_logout($account) {
// Set the account twice on the event: as the main subject but also in the
// list of arguments.
$event = new UserLogoutEvent($account, [
'account' => $account,
]);
$event_dispatcher = \Drupal::service('event_dispatcher');
$event_dispatcher->dispatch($event, UserLogoutEvent::EVENT_NAME);
}