X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fmarketing.inc.php;h=69156063bd3732be45e79df3c2ebb0cd694006c7;hb=6859200d482b72f9dc6483a3c27621d6e945736d;hp=9fd6f45c66b62939faeb1b5bc9a8f45a6926a097;hpb=232577de412b7ad4f29f1aeed23a2181c198f3cd;p=platal.git diff --git a/include/validations/marketing.inc.php b/include/validations/marketing.inc.php index 9fd6f45..6915606 100644 --- a/include/validations/marketing.inc.php +++ b/include/validations/marketing.inc.php @@ -1,6 +1,6 @@ m_user = &$mark; @@ -57,10 +57,10 @@ class MarkReq extends Validate public function formu() { $res = XDB::query('SELECT IF(MAX(m.last)>p.relance, MAX(m.last), p.relance) - FROM auth_user_md5 AS u - LEFT JOIN register_pending AS p ON p.uid = u.user_id - LEFT JOIN register_marketing AS m ON m.uid = u.user_id - WHERE user_id = {?}', + FROM accounts AS a + LEFT JOIN register_pending AS p ON p.uid = a.uid + LEFT JOIN register_marketing AS m ON m.uid = a.uid + WHERE a.uid = {?}', $this->m_user->id()); $this->m_relance = $res->fetchOneCell(); return 'include/form.valid.mark.tpl'; @@ -79,12 +79,14 @@ class MarkReq extends Validate protected function _mail_body($isok) { + $your1 = ($this->formal ? 'votre' : 'ton'); + $your2 = ($this->formal ? 'votre' : 'ta'); if ($isok) { return " Un email de marketing vient d'être envoyé " - . ($this->perso ? 'en ton nom' : 'en notre nom') + . ($this->perso ? "en $your1 nom" : 'en notre nom') . " à {$this->m_user->fullName()} ({$this->m_user->promo()}) " . "pour l'encourager à s'inscrire !\n\n" - . "Merci de ta participation !\n"; + . "Merci de $your2 participation !\n"; } else { return " Nous n'avons pas jugé bon d'envoyer d'email de marketing à " . "{$this->m_user->fullName()} ({$this->m_user->promo()}).";