Add rules

This commit is contained in:
Michael RICOIS 2018-03-12 11:52:00 +01:00
parent d1d0642f91
commit 1920a84634
2 changed files with 32 additions and 28 deletions

View File

@ -152,6 +152,8 @@ if($canSendInvitations) {
'@gmailcom' => '@gmail.com',
'@hotmailcom' => '@hotmail.com',
'@hotmailfr' => '@hotmail.fr',
'@yahoocom' => '@yahoo.com',
'@yahoofr' => '@yahoo.fr',
);
// Real use case replacement
$friendEmail = strtr($friendEmail, $replaceGlobal);
@ -163,7 +165,7 @@ if($canSendInvitations) {
$sld = substr($friendEmail, $atPos + 1, strlen($friendEmail) - ($atPos+1) - (strlen($tld)+1) );
if (empty($tld)) {
$this->errors[] = Tools::displayError('Invalid email');
$_POST['email'] = '';
$_POST['friendsEmail'] = '';
}
if (empty($this->errors)) {
// If you have a complete list of TLD, check it !

View File

@ -183,6 +183,8 @@ class AuthController extends AuthControllerCore
'@gmailcom' => '@gmail.com',
'@hotmailcom' => '@hotmail.com',
'@hotmailfr' => '@hotmail.fr',
'@yahoocom' => '@yahoo.com',
'@yahoofr' => '@yahoo.fr',
);
// Real use case replacement
$email = strtr($email, $replaceGlobal);
@ -220,7 +222,7 @@ class AuthController extends AuthControllerCore
}
}
}
echo $email; exit;
/* Preparing customer */
$customer = new Customer();
$lastnameAddress = $_POST['lastname'];