Prestashop 1.4.9:已使用此电子邮件注册了帐户

Prestashop 1.4.9:已使用此电子邮件注册了帐户,prestashop,Prestashop,昨天我在prestashop社区报告了一个bug。有人给我建议修复方法吗?既然你没有发布次要版本,我就采用了第一个和最后一个次要版本,并对它们进行了区分(确切地说是Customer.php类) 这是1.4.0.1: 这是1.4.8.3: 问题是,你正在使用介于两者之间的东西,并且更接近较低的一个 如您所见,后面的一个参数还有另一个可选参数$ignoreGuest,默认为true。因此,每个验证都被绕过 您可以执行以下两种操作之一: 升级至1.4的最新版本(http://code.google.

昨天我在prestashop社区报告了一个bug。有人给我建议修复方法吗?

既然你没有发布次要版本,我就采用了第一个和最后一个次要版本,并对它们进行了区分(确切地说是Customer.php类)

这是1.4.0.1:

这是1.4.8.3:

问题是,你正在使用介于两者之间的东西,并且更接近较低的一个

如您所见,后面的一个参数还有另一个可选参数$ignoreGuest,默认为true。因此,每个验证都被绕过

您可以执行以下两种操作之一:

  • 升级至1.4的最新版本(http://code.google.com/p/prestashop/downloads/detail?name=prestashop_1.4.8.3.zip&can=2&q=)如果您的任何组件与1.5不兼容。如果是的话,那就一直走到最新
  • 另一方面,如果您只需要一个快速而肮脏的修复:将Customer类中的函数更改为此答案中的第二个函数

你好,谢谢你的回答。我刚刚编辑了我的问题标题。我使用的是1.4.9,函数“customerExists”看起来像上面提供的第二个函数。这里也有类似的问题
static public function customerExists($email, $return_id = false)
{
    if (!Validate::isEmail($email))
        die (Tools::displayError());

    $result = Db::getInstance()->getRow('
    SELECT `id_customer`
    FROM `'._DB_PREFIX_.'customer`
    WHERE `email` = \''.pSQL($email).'\'');

    if ($return_id)
        return intval($result['id_customer']);
    else
        return isset($result['id_customer']);
}
public static function customerExists($email, $return_id = false, $ignoreGuest = true)
{
    if (!Validate::isEmail($email))
        die (Tools::displayError());

    $result = Db::getInstance()->getRow('
    SELECT `id_customer`
    FROM `'._DB_PREFIX_.'customer`
    WHERE `email` = \''.pSQL($email).'\''
    .($ignoreGuest ? 'AND `is_guest` = 0' : ''));

    if ($return_id)
        return (int)($result['id_customer']);
    else
        return isset($result['id_customer']);
}