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 ?
1 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);
-
Which construct i need to add this i am getting same error on create customer in magento2 ? Commented Jan 4, 2019 at 12:27
-
I have the same issue, can you add some more reference to this solution? Would be supergreat! Commented Jul 28, 2020 at 9:45
-
I have the same problem, may I ask which constructor ? Registry is now deprecated– wezzyCommented Aug 18, 2020 at 15:20