Updates class PlMailer to use the new User object.
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Sat, 23 Aug 2008 15:42:19 +0000 (17:42 +0200)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Sat, 23 Aug 2008 15:43:55 +0000 (17:43 +0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
classes/plmailer.php

index 2106d50..95e5a5c 100644 (file)
@@ -295,7 +295,10 @@ class PlMailer extends Mail_Mime {
     public function send($with_html = true)
     {
         $this->processPage($with_html);
-        if (S::v('forlife')) {
+        if (S::user()) {
+            $this->addHeader('X-Org-Mail', S::user()->forlifeEmail());
+        } else if (S::v('forlife')) {
+            // TODO(vzanotti): trash this code when hruid will be part of master.
             global $globals;
             $this->addHeader('X-Org-Mail', S::v('forlife') . '@' . $globals->mail->domain);
         }