From: Florent Bruneau Date: Wed, 4 Jun 2008 19:53:47 +0000 (+0200) Subject: No warning when adding an external address to a ML (Closes #839) X-Git-Tag: core/1.0.0~152 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=be79264232906c4a104ef7dfbe8f1ccd16726959;p=platal.git No warning when adding an external address to a ML (Closes #839) Signed-off-by: Florent Bruneau --- diff --git a/modules/lists.php b/modules/lists.php index 040e818..0f5b1f3 100644 --- a/modules/lists.php +++ b/modules/lists.php @@ -496,7 +496,7 @@ class ListsModule extends PLModule static public function no_login_callback($login) { require_once 'user.func.inc.php'; - global $list_unregistered; + global $list_unregistered, $globals; $users = get_not_registered_user($login, true); if ($users && $users->total()) { @@ -505,7 +505,10 @@ class ListsModule extends PLModule } $list_unregistered[$login] = $users; } else { - _default_user_callback($login); + list($name, $dom) = @explode('@', $login); + if ($dom == $globals->mail->domain || $dom == $globals->mail->domain2) { + _default_user_callback($login); + } } } @@ -553,7 +556,9 @@ class ListsModule extends PLModule if (Env::has('add_member')) { require_once('user.func.inc.php'); - $members = get_users_forlife_list(Env::v('add_member'), false, array('ListsModule', 'no_login_callback')); + $members = get_users_forlife_list(Env::v('add_member'), + false, + array('ListsModule', 'no_login_callback')); $arr = $this->client->mass_subscribe($liste, $members); if (is_array($arr)) { foreach($arr as $addr) {