[10.0.37.dev] empêche l'envoi d'un mail si captcha incorrect
This commit is contained in:
parent
5d880fa2da
commit
2f9f61c5a3
@ -31,7 +31,7 @@ class common {
|
|||||||
const TEMP_DIR = 'site/tmp/';
|
const TEMP_DIR = 'site/tmp/';
|
||||||
|
|
||||||
// Numéro de version
|
// Numéro de version
|
||||||
const ZWII_VERSION = '10.0.36.dev';
|
const ZWII_VERSION = '10.0.37.dev';
|
||||||
|
|
||||||
public static $actions = [];
|
public static $actions = [];
|
||||||
public static $coreModuleIds = [
|
public static $coreModuleIds = [
|
||||||
|
@ -293,6 +293,7 @@ class form extends common {
|
|||||||
// Préparation le contenu du mail
|
// Préparation le contenu du mail
|
||||||
$data = [];
|
$data = [];
|
||||||
$content = '';
|
$content = '';
|
||||||
|
$sent = false;
|
||||||
foreach($this->getData(['module', $this->getUrl(0), 'input']) as $index => $input) {
|
foreach($this->getData(['module', $this->getUrl(0), 'input']) as $index => $input) {
|
||||||
// Filtre la valeur
|
// Filtre la valeur
|
||||||
switch($input['type']) {
|
switch($input['type']) {
|
||||||
@ -318,10 +319,10 @@ class form extends common {
|
|||||||
$content .= '<strong>' . $this->getData(['module', $this->getUrl(0), 'input', $index, 'name']) . ' :</strong> ' . $value . '<br>';
|
$content .= '<strong>' . $this->getData(['module', $this->getUrl(0), 'input', $index, 'name']) . ' :</strong> ' . $value . '<br>';
|
||||||
}
|
}
|
||||||
// Crée les données
|
// Crée les données
|
||||||
$this->setData(['module', $this->getUrl(0), 'data', helper::increment(1, $this->getData(['module', $this->getUrl(0), 'data'])), $data]);
|
$success = $this->setData(['module', $this->getUrl(0), 'data', helper::increment(1, $this->getData(['module', $this->getUrl(0), 'data'])), $data]);
|
||||||
// Envoi du mail
|
// Envoi du mail
|
||||||
|
if ($success === true) {
|
||||||
// Rechercher l'adresse en fonction du mail
|
// Rechercher l'adresse en fonction du mail
|
||||||
$sent = true;
|
|
||||||
$singleuser = $this->getData(['user',
|
$singleuser = $this->getData(['user',
|
||||||
$this->getData(['module', $this->getUrl(0), 'config', 'user']),
|
$this->getData(['module', $this->getUrl(0), 'config', 'user']),
|
||||||
'mail']);
|
'mail']);
|
||||||
@ -369,6 +370,7 @@ class form extends common {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Redirection
|
// Redirection
|
||||||
$redirect = $this->getData(['module', $this->getUrl(0), 'config', 'pageId']);
|
$redirect = $this->getData(['module', $this->getUrl(0), 'config', 'pageId']);
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
|
Loading…
x
Reference in New Issue
Block a user