How can I force a customer reset his password programmatically for Magento 2
You can call ‘initiatePasswordReset’ to force Magento 2 reset their password programmatically.
$email = "demo@demo.com"; $object = \Magento\Framework\App\ObjectManager::getInstance(); $customerAccountManagement = $object->get('Magento\Customer\Model\AccountManagement'); $customerAccountManagement->initiatePasswordReset( $email, AccountManagement::EMAIL_RESET );