I'm performing a large import of an existing customer base from a different platform.

I've exported their DB and written a script to make a CSV to import into Magento 1.9. Unfortunately, we do not have a password. Is there a way to have Magento generate one and send each customer, as we add them, an email to perform a reset? I couldn't find any links on a strategy here.

1 Answer 1


You can write a script that gets all the newly imported customers and then it generates a new password and sends an email to your customers try this:

$customers = Mage::getModel('customer/customer')
        array('gteq', $dateYouImportedYourCustomers)

foreach ($customers as $customer) {
    /** @var $customer Mage_Customer_Model_Customer */
    if ($customer->getId()) {
        try {
            $newResetPasswordLinkToken =  Mage::helper('customer')->generateResetPasswordLinkToken();
        } catch (Exception $exception) {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.