1

I imported all my clients from my old Magento, however I could not get the password, I saw in some places that I should get the password hash that would be the password cryptographed with the salt, I do not want to know the password of the user, I simply want to keep the password how could I do this? I'm importing from Magento 1.4 to Magento 1.9

How do I get

require_once('app/Mage.php');
Mage::app(0);

        $id = 64995;
        $usuario_loaded = Mage::getModel('customer/customer')->load($id);
        $name = $usuario_loaded->getName();
        $hash = $usuario_loaded->getPasswordHash();

        print_r($name.' '.$hash);

        RESULT: Gustavo Souza f125f7e9cad50ea2dabf77673d555771a0230e218a6890e048b0a895ce532507:cM7m7Ay6x40UEGNX5t5aq8xFRJacXQne

How do I insert

require_once('app/Mage.php');
Mage::app(0);

        $id = 64995;
        $hash = 'f125f7e9cad50ea2dabf77673d555771a0230e218a6890e048b0a895ce532507:cM7m7Ay6x40UEGNX5t5aq8xFRJacXQne';
        $usuario_loaded = Mage::getModel('customer/customer')->load($id);
        $name = $usuario_loaded->getName();
        $usuario_loaded->setPasswordHash($hash);
        $usuario_loaded->save();

This would be my user, in the old magento I soon with the same password, but in the new magento I try to use the same password and I can not. Would it have something with the old encryption key of the other magento?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.