addition of email checking
This commit is contained in:
parent
fc86cfd982
commit
3a0ba4c19e
@ -1182,14 +1182,14 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor=
|
||||
AND (`date_end` > NOW() OR `date_end` = "0000-00-00 00:00:00")
|
||||
AND `enabled` = 1
|
||||
AND `version` = "'.pSQL($site_version_front).'"
|
||||
AND `sponsor` = "'.pSQL($email).'"
|
||||
AND `sponsor` = "'.pSQL($email).'"
|
||||
');
|
||||
if (!empty($tr_infos['tag_auth'])) {
|
||||
$smarty->assign(array(
|
||||
'tag_auth' => $tr_infos['tag_auth'],
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if($c = Db::getInstance()->getRow('
|
||||
@ -1202,17 +1202,17 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor=
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(isset($_COOKIE['4598484FDSFDSREFERAL8849FDS'])){
|
||||
$referal_email = base64_decode($_COOKIE['4598484FDSFDSREFERAL8849FDS']);
|
||||
$smarty->assign('sponsor_email', $referal_email);
|
||||
} else {
|
||||
if (isset($customer)) {
|
||||
setcookie('4598484FDSFDSREFERAL8849FDS', base64_encode($customer->email), time() + 3600 * 24, '/', 'bebeboutik.com');
|
||||
setcookie('4598484FDSFDSREFERAL8849FDS', base64_encode($customer->email), time() + 3600 * 24, '/', 'bebeboutik.com');
|
||||
}
|
||||
}
|
||||
// setcookie('554b43403edef30d31412286d5098965', $sponsor, time() + 3600 * 24, '/', 'bebeboutik.com');
|
||||
|
||||
|
||||
// if(isset($_COOKIE['554b43403edef30d31412286d5098965'])){
|
||||
// $sponsor = $_COOKIE['554b43403edef30d31412286d5098965'];
|
||||
// $email = base64_decode(strrev(substr($sponsor, 12)));
|
||||
@ -1548,10 +1548,10 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor=
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$display_credits = true;
|
||||
$sql = 'SELECT id_customer FROM `'._DB_PREFIX_.'customer_credits` WHERE id_customer = ' .(int) $customer->id;
|
||||
if(Db::getInstance()->getValue($sql)){
|
||||
if(Db::getInstance()->getValue($sql)){
|
||||
$display_credits = false;
|
||||
}
|
||||
|
||||
@ -1783,6 +1783,7 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor=
|
||||
NULL,
|
||||
dirname(__FILE__).'/mails/'
|
||||
);
|
||||
mail('marion@antadis.com', '[BBB] Sending referralInvite - send credit mail', http_build_query($params,'',', '));
|
||||
}
|
||||
|
||||
private function _send_loyalty_mail($params) {
|
||||
@ -1849,7 +1850,7 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor=
|
||||
AND `id_customer` != 0
|
||||
');
|
||||
}
|
||||
|
||||
|
||||
public function getNbFriends($id_customer=FALSE) {
|
||||
if(!(int) $id_customer) {
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user