forked from ZwiiCMS-Team/ZwiiCMS
[form 1.6] envoi de groupe ok
This commit is contained in:
parent
3efa972d71
commit
7bde4a55af
@ -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'];
|
||||
|
Loading…
Reference in New Issue
Block a user