braffas Posted June 12, 2017 Posted June 12, 2017 I don't know if this is the right place to post this, but here goes. In the method below Customer->customerExists public static function customerExists($email, $returnId = false, $ignoreGuest = true) { if (!Validate::isEmail($email)) { if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_) { die(Tools::displayError('Invalid email')); } return false; } $sql = new DbQuery(); $sql->select('`id_customer`'); $sql->from(bqSQL(static::$definition['table'])); $sql->where('`email` = \''.pSQL($email).'\' '.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER)); $sql->where('`is_guest` = 0'); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql); return ($returnId ? (int) $result : (bool) $result); } The $ignoreGuest param is not used by the DB query anymore. This may give some annoying problems (no errors) with modules that use the method.
braffas Posted June 12, 2017 Author Posted June 12, 2017 Nope, Braffas is also my GitHub name I will check GitHub first next time. Great that it's getting fixed :)
Havouza Posted June 12, 2017 Posted June 12, 2017 I have a feeling that Braffas is Scaninavian of some sort ;-)
Havouza Posted June 12, 2017 Posted June 12, 2017 Swede here but since many years European. Now Cyprus since 4 years
Havouza Posted June 13, 2017 Posted June 13, 2017 Good to here! Help is strongly needed with proofreading the Swedish translation
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now