Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento不会避免重复的电子邮件注册_Magento_Magento 1.5 - Fatal编程技术网

Magento不会避免重复的电子邮件注册

Magento不会避免重复的电子邮件注册,magento,magento-1.5,Magento,Magento 1.5,我在Magento上编码,注册时遇到问题。 我不知道如何以及为什么会引起这个问题。 在customer_entity表中创建了一个电子邮件地址,其创建次数为2个帐户的两倍,其中有2个实体id。我使用的是magento 1.5版 例如: entity_id | email | created_at 495 | abch@gmail.com | 2013-10-19 09:47:01 496 | abch@gmail.com | 2013-10-19

我在Magento上编码,注册时遇到问题。 我不知道如何以及为什么会引起这个问题。 在customer_entity表中创建了一个电子邮件地址,其创建次数为2个帐户的两倍,其中有2个实体id。我使用的是magento 1.5版

例如:

entity_id  | email          | created_at
495        | abch@gmail.com | 2013-10-19 09:47:01
496        | abch@gmail.com | 2013-10-19 09:47:03
在我的customer_entity表中,大约有1000多条记录,但大约有30条记录存在重复电子邮件,如上面的示例所示

请帮我这个。谢谢

$customerObj = Mage::getModel("customer/customer");
foreach (Mage::app()->getWebsites() as $website) {
    $customerObj->setWebsiteId($website->getId());
    $customerObj->loadByEmail($customer['email']);
    if ($customerObj->getId()) {
      $message = "duplicate found" ;
      return $message;
   }

}