如何从Magento DB获取客户用户名和密码

时间:2016-12-28 07:34:33

标签: magento

我有Magento数据库,我想使用Mysql Query从Magento数据库中获取客户用户名和密码。

1 个答案:

答案 0 :(得分:0)

客户使用电子邮件和密码登录,如果您希望所有客户都使用电子邮件和密码,则此查询可以提供帮助

SELECT c.entity_id,c.email, 
        (
        SELECT fn.value
        FROM customer_entity_varchar fn
        WHERE c.entity_id = fn.entity_id AND 
         fn.attribute_id = 12) AS password_hash, 

         (
        SELECT fn.value
        FROM customer_address_entity_varchar fn
        WHERE ca.entity_id = fn.entity_id AND 
         fn.attribute_id = 30) AS cep
        FROM customer_entity AS c
        LEFT JOIN customer_address_entity AS ca ON c.entity_id = ca.parent_id
        LEFT JOIN customer_address_entity_text AS cat ON cat.entity_id = ca.entity_id                

        GROUP BY entity_id