How to override createpost controller magento 2
For adding custom functionality when we create customer account at that time Overriding createpost controller is needed because changing in core magento files are bad idea. For overriding we have to create preference for it. Create preference in di.xml file. Path can be Magesan/Extension/etc/frontend/di.xml Create CreatePost.php at Magesan\Extension\Controller\Account\CreatePost.php