Fix alias computation.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 25 May 2008 10:42:52 +0000 (12:42 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 25 May 2008 10:42:52 +0000 (12:42 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
include/massmailer.inc.php

index 8b01b50..19996fe 100644 (file)
@@ -164,9 +164,13 @@ abstract class MassMailer
         global $globals;
         $alias = $login;
         if (strpos($login, '@') === false) {
-            $alias = $login;
             $login = "$login@{$globals->mail->domain}";
         }
+        require_once('user.func.inc.php');
+        $forlife = get_user_forlife($login, '_silent_user_callback');
+        if ($forlife) {
+            $alias = $forlife;
+        }
         if (strpos($alias, '@') === false && (is_null($hash) || $hash == 0)) {
 
             $hash = $this->createHash(array($prenom, $nom, $login, $sexe, $html, rand(), "X.org rulez"));