I am working on Admin Actions Log Extension. For the reference i am using the link below


I want to get old and new data of customers when we save the customer.


I'm using these events model_save_before and model_save_after for saving old data to the registry and retrieve it to the save after event, but I'm getting old data as null from the registry.


$object = $observer->getObject();
$customer = $this->objectManager->get('Magento\Customer\Model\Backend\Customer')->load($object->getId());
$customerData = $customer->getData();
$this->registryManager->register('adminactionslog_savebefore_data', $customerData, true);


$oldData = $this->registryManager->registry('adminactionslog_savebefore_data');
// var_dump($oldData); I'm getting this value as null

if anyone has a solution please let me know.

1 Answer 1


There is a problem with this particular event

Magento 2 origData null in customer_save_before

You are going to have to use a different event or code a workaround.

  • do you have any suggestions?
    – Mohit Rane
    Aug 8, 2019 at 10:13

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.