i am tried to create login by mobile module so i need to confirm customer after verify mobile number.by this code i do that
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<?php private $customer; public function __construct( ... \Magento\Customer\Model\Customer $customer, ... ) { ... $this->customer = $customer; ... } ... $customerId = '1'; $customer = $this->customer->load($customerId); $customer->setConfirmation(null); $customer->save(); |