From 0724d37d889613c1e612caeaa45df6357e3e9b0a Mon Sep 17 00:00:00 2001 From: fredtempez Date: Wed, 13 Feb 2019 19:57:10 +0100 Subject: [PATCH] =?UTF-8?q?Libell=C3=A9=20s=C3=A9lection=20single=20mail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/form/form.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/module/form/form.php b/module/form/form.php index 2b23efb2..77252975 100755 --- a/module/form/form.php +++ b/module/form/form.php @@ -60,7 +60,7 @@ class form extends common { ksort($userIdsFirstnames); self::$listUsers [] = ''; foreach($userIdsFirstnames as $userId => $userFirstname) { - self::$listUsers [] = $this->getData(['user', $userId, 'mail']); + self::$listUsers [] = $userId; } // Soumission du formulaire if($this->isPost()) { @@ -74,7 +74,7 @@ class form extends common { 'capcha' => $this->getInput('formConfigCapcha', helper::FILTER_BOOLEAN), 'group' => $this->getInput('formConfigGroup', helper::FILTER_INT), 'user' => self::$listUsers [$this->getInput('formConfigUser', helper::FILTER_INT)], - 'mail' => $this->getInput('formConfigMail', helper::FILTER_MAIL), + 'mail' => $this->getInput('formConfigMail') , 'pageId' => $this->getInput('formConfigPageId', helper::FILTER_ID), 'subject' => $this->getInput('formConfigSubject') ] @@ -307,9 +307,13 @@ class form extends common { // Crée les données $this->setData(['module', $this->getUrl(0), 'data', helper::increment(1, $this->getData(['module', $this->getUrl(0), 'data'])), $data]); // Envoi du mail + // Rechercher l'adresse en fonction du mail $sent = true; - $singleuser = $this->getData(['module', $this->getUrl(0), 'config', 'user']); + $singleuser = $this->getData(['user', + $this->getData(['module', $this->getUrl(0), 'config', 'user']), + 'mail']); $singlemail = $this->getData(['module', $this->getUrl(0), 'config', 'mail']); + // Verification si le mail peut être envoyé if( self::$inputNotices === [] AND $group = $this->getData(['module', $this->getUrl(0), 'config', 'group'])