2

I am working on a new project. I am facing a problem where I need to save the details when an admin user is created. I am planning to use an observer to catch the event. I need to know that is there any event in magento defined for getting the admin user creation.

Thanks in advance.

3

Try to use admin_user_save_after.
In your observer you can then retrieve the user like this:

public function doSomething($observer){
    $adminUser = $observer->getEvent()->getObject();
    //do something with admin user
}

Keep in mind that this event is dispatched even when an existing user changes his password.
To identify if the user is new, you can check :

$adminUser->getOrigData('user_id');

If the code above returns null then is a new admin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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