0

I'm very new to Magento 2.3, so I can't find a list of all the events that are related to user accounts. I need to create observers for user deleted, user updated (any information in account) and user created. Could I get some help please? :)

I found quite old information about events customer_save_after and customer_delete_after, but I'm not sure they are still used in 2019.

Also, if you could provide a link to a list with all (current) events in Magento 2.3, it would be very useful. Thank you.

1

2 Answers 2

1

You can use "customer_delete_after" event in Magento 2.3.

<event name="customer_delete_after">
    <observer name="ddg_remove_contact" instance="Dotdigitalgroup\Email\Observer\Customer\RemoveContact"/>
</event>

This event is used in Magento's dotmailer module in the vendor.

Below is the link for the event list in Magento 2.

https://www.mageplaza.com/magento-2-module-development/magento-2-events.html

2
  • Thank you. I actually experience something strange in customers admin area, it doesn't allow me to edit or delete customers (I'm working in developer mode and log in as admin). But after I resolve this issue, will try your suggestion.
    – Violeta
    Commented Aug 16, 2019 at 8:51
  • It would be more helpful to know where Magento is dispatching this event, I assume some abstract class doing "[model]_delete_after" but I can't get this my observer to execute for this. Commented Apr 8, 2022 at 20:50
0

you can hook into customer_save_after_data_object event where it will provide previous customer object and new object as observer parameters for deletion you can use customer_delete_after

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.