Merge remote-tracking branch 'origin/ticket-14525-parrain' into develop

This commit is contained in:
Michael RICOIS 2017-11-07 12:18:00 +01:00
commit c2c55f1302
2 changed files with 5 additions and 5 deletions

View File

@ -27,8 +27,8 @@ if ($id_customer !== 0 && Tools::getValue('adtoken') === Tools::encrypt('InviteA
// Search customer by email
elseif (Tools::getvalue('action') == 'search') {
$q = Tools::getValue('term');
$sql = 'SELECT `id_customer` AS id, CONCAT_WS(" ", `lastname`, `firstname`, `email`) AS value
FROM `'._DB_PREFIX_.'customer` WHERE `email` LIKE "'.$q.'%"';
$sql = 'SELECT `id_customer` AS id, CONCAT_WS(" ", `lastname`, `firstname`, CONCAT("(", `email`, ")")) AS value
FROM `'._DB_PREFIX_.'customer` WHERE `email` LIKE "'.pSQL($q).'%"';
$result = Db::getInstance()->executeS($sql);
echo Tools::jsonEncode($result);
exit;

View File

@ -1303,11 +1303,11 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor=
0
)');
}
// Replace
else {
// Replace - Do nothing
/*else {
$result = Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'invite` SET `id_sponsor`='.$id_sponsor.
' WHERE `id_customer`='.$customer->id);
}
}*/
if (count($orders) == 1 && $result) {
$sponsorCustomer = new Customer($id_sponsor);