function rules_user_login
Same name in other branches
- 7.x-2.x modules/events.inc \rules_user_login()
Implements hook_user_login().
2 calls to rules_user_login()
- EventIntegrationTest::testMultipleEvents in tests/
src/ Kernel/ EventIntegrationTest.php - Test that rules config supports multiple events.
- EventIntegrationTest::testUserLoginEvent in tests/
src/ Kernel/ EventIntegrationTest.php - Test that the user login hook triggers the Rules event listener.
4 string references to 'rules_user_login'
- ConfigureAndExecuteTest::testUpcastInCondition in tests/
src/ Functional/ ConfigureAndExecuteTest.php - Tests upcasting in a condition.
- EventIntegrationTest::testMultipleEvents in tests/
src/ Kernel/ EventIntegrationTest.php - Test that rules config supports multiple events.
- EventIntegrationTest::testUserLoginEvent in tests/
src/ Kernel/ EventIntegrationTest.php - Test that the user login hook triggers the Rules event listener.
- UserLoginTest::testUserLoginEvent in tests/
src/ Unit/ Integration/ Event/ UserLoginTest.php - Tests the event metadata.
File
-
./
rules.module, line 98
Code
function rules_user_login($account) {
// Set the account twice on the event: as the main subject but also in the
// list of arguments.
$event = new UserLoginEvent($account);
$event_dispatcher = \Drupal::service('event_dispatcher');
$event_dispatcher->dispatch($event, UserLoginEvent::EVENT_NAME);
}