Updates aliases and MLs on new redirection addition (Closes #1549).
authorStéphane Jacob <sj@m4x.org>
Thu, 20 Oct 2011 09:51:31 +0000 (11:51 +0200)
committerStéphane Jacob <sj@m4x.org>
Fri, 21 Oct 2011 08:34:13 +0000 (10:34 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
ChangeLog
include/emails.inc.php

index 3a4808d..58c2e75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@ Bug/Wish:
     * Email:
         - #1529: Stores and uses preferences for sending emails from site  -JAC
         - #1516: Enables @polytechnique.edu adresses for old promotions    -GLN
+        - #1549: Updates aliases and MLs on new redirection addition       -JAC
 
     * Lists:
         - #1543: Displays no member in directory view for empty lists      -JAC
index a22adb5..2cf14d8 100644 (file)
@@ -816,6 +816,9 @@ class Redirect
         XDB::execute('REPLACE INTO  email_redirect_account (uid, redirect, flags, action)
                             VALUES  ({?}, {?}, \'active\', {?})',
                      $this->user->id(), $email, $filter);
+        $listClient = new MMList(S::user());
+        $listClient->change_user_email($this->user->forlifeEmail(), $new_email);
+        update_alias_user($this->user->forlifeEmail(), $new_email);
         if ($logger = S::v('log', null)) { // may be absent --> step4.php
             S::logger()->log('email_add', $email . ($this->user->id() != S::v('uid') ? " (admin on {$this->user->login()})" : ""));
         }