I set the configuration for Magento 2 customer to do email confirmation after register and change e-mail, is there a way to confirm customer e-mail programmatically only by customer id or customer e-mail?
$customerId = '35';
$customerEmail = '[email protected]';
$this->confirmCustomerEmailByCustomerId($customerId); //how ?
$this->confirmCustomerEmailByCustomerEmail($customerEmail); //how ?