[form 1.6] envoi de groupe ok

This commit is contained in:
fredtempez 2019-03-10 20:56:36 +01:00
parent 3efa972d71
commit 7bde4a55af
1 changed files with 8 additions and 7 deletions

View File

@ -32,7 +32,7 @@ class form extends common {
public static $pagination;
const FORM_VERSION = '1.5';
const FORM_VERSION = '1.6';
const TYPE_MAIL = 'mail';
const TYPE_SELECT = 'select';
@ -317,16 +317,17 @@ class form extends common {
$this->getData(['module', $this->getUrl(0), 'config', 'user']),
'mail']);
$singlemail = $this->getData(['module', $this->getUrl(0), 'config', 'mail']);
$group = $this->getData(['module', $this->getUrl(0), 'config', 'group']);
// Verification si le mail peut être envoyé
if(
self::$inputNotices === [] && (
$group = $this->getData(['module', $this->getUrl(0), 'config', 'group']) ||
$group > 0 ||
$singleuser !== '' ||
$singlemail !== '' )
) {
// Utilisateurs dans le groupe
if (!empty($user)){
$to = [];
if ($group > 0){
foreach($this->getData(['user']) as $userId => $user) {
if($user['group'] === $group) {
$to[] = $user['mail'];