Skip to main content
deleted 79 characters in body; edited tags
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

I noticed that account.set is the following event is definedinvoked for when a user account is 'set.

const SET_USER = 'account.set';

I want to execute code by creatingcreate an event subscriber which adds a callback invoked when a new user registers on the site. However, I am not sure whether the aboveaccount.set is the correct event we need to subscribe to for this purpose. 

Are there other events that are better events for this?

I noticed that the following event is defined for when a user account is 'set

const SET_USER = 'account.set';

I want to execute code by creating an event subscriber when a new user registers on the site. However, I am not sure whether the above is the event we need to subscribe to for this purpose. Are there other events that are better for this?

I noticed that account.set is the event invoked for a user account.

I want to create an event subscriber which adds a callback invoked when a new user registers on the site. I am not sure whether account.set is the correct event. 

Are there other better events for this?

removed "Drupal" and tags from the title
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Which event should we subscribe to if we want code to be triggered when a new user registers on a Drupal 8 site?

Source Link
Binny
  • 934
  • 7
  • 26

Which event should we subscribe to if we want code to be triggered when a new user registers on a Drupal 8 site?

I noticed that the following event is defined for when a user account is 'set

const SET_USER = 'account.set';

I want to execute code by creating an event subscriber when a new user registers on the site. However, I am not sure whether the above is the event we need to subscribe to for this purpose. Are there other events that are better for this?