Total Posts: 2
I tried solving this by changing core codes to encrypt those plain text passwords when imported, but got no luck. Passwords were still plain texts when I checked the database.
Alternatively, what I did is I encrypt the passwords on my local using MySQL script before importing it on the backend.
So first, I exported Customers from the admin login to get the right format in importing files.
1. at the backend go to System -> Import/Export -> Export
2. Select Customers from Entity Type dropdown
3. Click continue
Create a csv file with the data to be imported following the format of the exported file. With passwords in plain text. Save
Import this on your local phpmyadmin on any database, and run this script:
(NOTE: I placed the csv file on my phpmyadmin folder)
load data local infile 'customers.csv' into table tbl_customers fields terminated by ','
enclosed by '"'
lines terminated by '\n'
run the second script: (I used ‘NP’ as my salt word, you can use any)
UPDATE tbl_customers SET `password_hash` = CONCAT((MD5(CONCAT('NP',`password_hash`))), ':NP');
=> Magento’s encryption is: MD5(Salt word + password):Salt word
Now the passwords are encrypted, export the table and don’t forget to include field names on export options.
Go back to the backend and import the csv file.
This worked, though I’m still trying to find the most efficient way on the import function.
I would appreciate anyone who’d share the workaround with this. Still a newbie in magento