I created a new tab on User edit, with a form
I want to save the data getting from the form the other table on Database (Ex: test_table
) when I click on save user
button, is there any method to do that?
I try to use events
XML:
<event name="customer_account_edited">
<observer name="test_event" instance="Testing\Test\Observer\TestUserOnSave"/>
</event>
PHP (TestUserOnSave)
public function execute(Observer $observer){
$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/logger.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info('test events');
}
But it's doesn't work, is there any solution?