Needs review
Project:
Registration role
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Aug 2023 at 16:21 UTC
Updated:
16 Oct 2025 at 18:25 UTC
Jump to comment: Most recent
Comments
Comment #2
darkdimComment #4
darkdimComment #12
darkdimComment #13
mlncn commentedOooh very interesting. Could you describe how the event can be intercepted/used?
Comment #14
darkdimYes, sure.
1. Create a module
2. You need to describe the service as an event subscriber
3. Create an EventSubscriber directory in the src folder
4. Create the subscriber class itself
There is a book with a code, at the address you can see events https://selwynpolit.github.io/d9book/events
Comment #15
mandclu commentedIt's worth pointing out that you could probably also handle this in configuration by using ECA.
Comment #16
mlncn commented@darkdim rather than having the overhead (and harder-to-follow code) of actually implementing the the event handler, is it OK to treat it as an "alter" event and only have an example of implementing it, perhaps in a registration_role.api.php file?
Thanks so much, i do think we should bring this in before we change anything that would break applying this merge request as a patch.
Current code in: https://git.drupalcode.org/project/registration_role/-/merge_requests/3/...
Also is the gitlab-ci.yml something all contrib projects should have now?
Comment #17
anybody@mlncn so should this be closed now?