forked from ZwiiCMS-Team/ZwiiCMS
[9.0.04] Captcha et mail de groupe vide
This commit is contained in:
parent
3ad6fb5b04
commit
cfca073208
@ -32,7 +32,7 @@ class form extends common {
|
|||||||
|
|
||||||
public static $pagination;
|
public static $pagination;
|
||||||
|
|
||||||
const FORM_VERSION = '1.4';
|
const FORM_VERSION = '1.5';
|
||||||
|
|
||||||
const TYPE_MAIL = 'mail';
|
const TYPE_MAIL = 'mail';
|
||||||
const TYPE_SELECT = 'select';
|
const TYPE_SELECT = 'select';
|
||||||
@ -279,6 +279,7 @@ class form extends common {
|
|||||||
AND $this->getInput('formCapcha', helper::FILTER_INT) !== $this->getInput('formCapchaFirstNumber', helper::FILTER_INT) + $this->getInput('formCapchaSecondNumber', helper::FILTER_INT))
|
AND $this->getInput('formCapcha', helper::FILTER_INT) !== $this->getInput('formCapchaFirstNumber', helper::FILTER_INT) + $this->getInput('formCapchaSecondNumber', helper::FILTER_INT))
|
||||||
{
|
{
|
||||||
self::$inputNotices['formCapcha'] = 'Incorrect';
|
self::$inputNotices['formCapcha'] = 'Incorrect';
|
||||||
|
|
||||||
}
|
}
|
||||||
// Préparation le contenu du mail
|
// Préparation le contenu du mail
|
||||||
$data = [];
|
$data = [];
|
||||||
@ -318,19 +319,20 @@ class form extends common {
|
|||||||
$singlemail = $this->getData(['module', $this->getUrl(0), 'config', 'mail']);
|
$singlemail = $this->getData(['module', $this->getUrl(0), 'config', 'mail']);
|
||||||
// Verification si le mail peut être envoyé
|
// Verification si le mail peut être envoyé
|
||||||
if(
|
if(
|
||||||
self::$inputNotices === []
|
self::$inputNotices === [] && (
|
||||||
AND $group = $this->getData(['module', $this->getUrl(0), 'config', 'group'])
|
$group = $this->getData(['module', $this->getUrl(0), 'config', 'group']) ||
|
||||||
OR $singleuser !== ''
|
$singleuser !== '' ||
|
||||||
OR $singlemail !== ''
|
$singlemail !== '' )
|
||||||
) {
|
) {
|
||||||
// Utilisateurs dans le groupe
|
// Utilisateurs dans le groupe
|
||||||
$to = [];
|
if (!empty($user)){
|
||||||
foreach($this->getData(['user']) as $userId => $user) {
|
$to = [];
|
||||||
if($user['group'] === $group) {
|
foreach($this->getData(['user']) as $userId => $user) {
|
||||||
$to[] = $user['mail'];
|
if($user['group'] === $group) {
|
||||||
|
$to[] = $user['mail'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Utilisateur désigné
|
// Utilisateur désigné
|
||||||
if (!empty($singleuser)) {
|
if (!empty($singleuser)) {
|
||||||
$to[] = $singleuser;
|
$to[] = $singleuser;
|
||||||
|
Loading…
Reference in New Issue
Block a user