문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top