Event Listener not working in v8 anymore


I have developed a package which registers the user on external plattforms (such as Wordpress, Typo3, etc.) when he registers on Concrete5. For this purpose I hooked into the on_user_add and on_user_validate event and it worked like a charm in v7. I had placed both listeners to the on_start function in my controller as follows (as shown in the documentation herehttps://documentation.concrete5.org/developers/application-events/ho...

public function on_start() 
        Events::addListener('on_user_add', function($event) {
            // here starts the code where the user is added in external databases
        Events::addListener('on_user_validate', function($event) {
           // here is the code when the user status is updated in external databases

After updating the system to v8 this does not work anymore. The registration process leads to a kind of endless loop. The only event which is fired is on_attributes_saved. I cannot hook into on_user_add and on_user_validate anymore. The registration process ends (after a long loading time, sometimes with browser freeze) with the message that an account with the given values still exists, even though it should not. After inspecting the database I see that the user was inserted, but does not appear in the dashboard.

Has there something changed in v8 in the handling of events and hooking into respectively?

This is weird.

Hope that someone can help.

All the best, Paolo

View Replies:
Gondwana replied on at Permalink Reply
I think they might have resequenced the order in which some controller events are called compared to when c5 does some of its own initialisation. Scour github for clues.
OKDnet replied on at Permalink Reply
I would post this on the Slack Channel for Package Development

You'll definitely get an informed response quicker there.
pamentz replied on at Permalink Reply
I had to register a new account as when I logged in there appeared a message that the account is inactive. So here my reply with the new account:

Thanks for your answers.


How can I do this? Seems that only registered members can do this (and view the provided link) with an email adress ending on the domains @concretecms or @portlandlabs.
pamentz replied on at Permalink Reply
Found the channel and posted the problem there. Thank you.
OKDnet replied on at Permalink Reply
NP, hopefully it will help you get an answer, because changes like this can be frustrating when there's no documentation.