NC app event hooks?

Hello! I am very new to nextcloud app development and I’m a bit confused about how one would do what I want to do, maybe you can help (much appriciated):

I have a simple piece of code that needs to run every time a user updates their email-address and when a user is created or deleted/inactivated. The code is/would be a simple script that calls an external rest-api.

The code will need every active users email-address and their group memberships (it updates email-groups/aliases/lists or w/e they are called in stalwart mail server).

  1. Is there a hook that can allow my apps code to run every time an email is changed/user added or inactivated/deleted?

  2. How would I in the best way get lists of email-adresses and their group memberships?

Have you checked the Developer Manual, which references to e.g. hooks?!

Yeah but I had majorly misunderstood what I read… I have now gotten an app up and working listening to the OCP event dispatcher, sorry for the noise!