Fixes promo marketing display ; still a bug
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Wed, 23 Jun 2010 00:34:03 +0000 (02:34 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Wed, 23 Jun 2010 00:34:41 +0000 (02:34 +0200)
We have lost the "last_known_email" in the migration, but we need to
display it here.

Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
classes/user.php
templates/marketing/promo.tpl

index 33b4de2..c69e234 100644 (file)
@@ -379,6 +379,7 @@ class User extends PlUser
         if (isset($this->last_known_email)) {
             return;
         }
+        // FIXME: We should fetch the last known email as well as the pending registration email (they aren't the same !)
         $infos = XDB::fetchOneAssoc('SELECT  IF (MAX(m.last) > p.relance, MAX(m.last), p.relance) AS last_relance,
                                              p.email AS last_known_email
                                        FROM  register_pending AS p
index d95171d..0cdf5a2 100644 (file)
@@ -51,7 +51,7 @@
       <td class="center">
         {if $it->lastMarketingRelance() && $it->lastMarketingRelance() != '0000-00-00'}
         Relance le&nbsp;: {$it->lastMarketingRelance()}
-        {elseif $it.email}
+        {elseif $it->lastKnownEmail()}
         En cours&nbsp;: {$it->lastKnownEmail()}
         {else}
         -