Delete Operation Forbidden for Current Area in Magento 2

magento2

I added some custom attributes and i
set
show_address_fields -> true in the layout for the reference block customer_form_register but i get this error when trying to create a customer. The address is not added but the customer is added so what's the problem. Any help ,please ?

Best Answer

In your construct function add the Registry class like -

\Magento\Framework\Registry $registry,

And then in your construct function add like -

$registry->register('isSecureArea', true);