You this you to need customize EditPost
controller class below file:
Magento\Customer\Controller\Account\EditPost
In excute method below function check if email change request is sent or not
// whether a customer enabled change email option
$this->processChangeEmailRequest($currentCustomerDataObject);
In processChangeEmailRequest
function there is check for Password check.
/**
* Process change email request
*
* @param \Magento\Customer\Api\Data\CustomerInterface $currentCustomerDataObject
* @return void
* @throws InvalidEmailOrPasswordException
* @throws UserLockedException
*/
private function processChangeEmailRequest(\Magento\Customer\Api\Data\CustomerInterface $currentCustomerDataObject)
{
if ($this->getRequest()->getParam('change_email')) {
// authenticate user for changing email
try {
$this->getAuthentication()->authenticate(
$currentCustomerDataObject->getId(),
$this->getRequest()->getPost('current_password')
);
} catch (InvalidEmailOrPasswordException $e) {
throw new InvalidEmailOrPasswordException(__('The password doesn\'t match this account.'));
}
}
}
You can disable this function call processChangeEmailRequest
by creating Around event plugin for EditPost
controller.