Suite à une mise à jour de phpMyFaq de la version 2.0.15 à la version 2.7.3, je tente de restreindre le domaine pour l'utilisateur qui renseigne le champ "Votre adresse e-mail ".
Dans la version 2.0.15, j'ai adapté la fonction "checkEmail" du fichier /inc/functions.php, mais je ne parviens pas à la même chose dans la version 2.7.3.
Merci d'avance pour l'aide.
Bye, Dylan
Function checkEmail - phpmyfaq-2.0.15 VS phpmyfaq-2.7.3
Moderator: Thorsten
Re: Function checkEmail - phpmyfaq-2.0.15 VS phpmyfaq-2.7.3
HI,
it's now in inc/Mail.php and the method is called validateEmail()
bye
Thorsten
it's now in inc/Mail.php and the method is called validateEmail()
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Function checkEmail - phpmyfaq-2.0.15 VS phpmyfaq-2.7.3
Hi,
First of all, thank you for the reply.
I tried to restrict the mail address in the method called "validateEmail" but something is wrong.
Here is a part of the functions.php file from phpMyFaq 2.0.15 :
function checkEmail($sender)
{
global $IDN;
$sender = $IDN->decode($sender);
$senderDomain = substr($sender, -10, 10);
$pattern = "#^[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+".
"@".
"[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+\.".
"[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+$#";
if ($senderDomain == '@gmail.com') {
if (preg_match($pattern, $sender)) {
return true;
} else {
return false;
}
} else {
return false;
}
}
Could you help me to do the same in the Mail.php file, please ?
First of all, thank you for the reply.
I tried to restrict the mail address in the method called "validateEmail" but something is wrong.
Here is a part of the functions.php file from phpMyFaq 2.0.15 :
function checkEmail($sender)
{
global $IDN;
$sender = $IDN->decode($sender);
$senderDomain = substr($sender, -10, 10);
$pattern = "#^[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+".
"@".
"[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+\.".
"[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+$#";
if ($senderDomain == '@gmail.com') {
if (preg_match($pattern, $sender)) {
return true;
} else {
return false;
}
} else {
return false;
}
}
Could you help me to do the same in the Mail.php file, please ?
Re: Function checkEmail - phpmyfaq-2.0.15 VS phpmyfaq-2.7.3
Hi,
what are you trying to do?
bye
Thorsten
what are you trying to do?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Function checkEmail - phpmyfaq-2.0.15 VS phpmyfaq-2.7.3
Hi,
I'm trying to force users in the FAQ to give email address from "gmail.com" domain.
Dylan
I'm trying to force users in the FAQ to give email address from "gmail.com" domain.
Dylan
Re: Function checkEmail - phpmyfaq-2.0.15 VS phpmyfaq-2.7.3
HI,
so only @gmail.com addresses should be valid?
bye
Thorsten
so only @gmail.com addresses should be valid?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Function checkEmail - phpmyfaq-2.0.15 VS phpmyfaq-2.7.3
Hi,
Yes. The FAQ is only for few people.
Dylan
Yes. The FAQ is only for few people.
Dylan