Magento 1.9 – How to Share Customer Account Globally

magento-1.9

I'm trying to share my customer account Globally:

I have two stores :

www.mainstore.com

store1.mainstore.com

I want to add functionality that if customer register any of the store can have access to login any store with same details.

To activate this made some changes in admin panel > system > configuration > customer configuration > Account Sharing Option > Share Customer Accounts > Global.

After changing the setting to Global when i click on save Config button i got below error :
Error : Cannot share customer accounts globally because some customer accounts with the same emails exist on multiple websites and cannot be merged.

enter image description here

Why i am getting this error ?
Suggest me the solution for this issue.

Best Answer

This works for me :

Run this query in you database :

SET SESSION old_alter_table=1; ALTER IGNORE TABLE customer_entity ADD UNIQUE INDEX duplicate_email (email);

Related Topic