ML-List errors during registration are non-fatal (but still logged).
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 2 Jan 2011 17:02:46 +0000 (18:02 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 2 Jan 2011 17:02:46 +0000 (18:02 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
modules/register.php

index 331f618..40e5322 100644 (file)
@@ -374,8 +374,13 @@ class RegisterModule extends PLModule
                         XDB::execute('INSERT IGNORE INTO  group_members (uid, asso_id)
                                                   VALUES  ({?}, {?})',
                                      $uid, $asso_id);
-                        $mmlist = new MMList($user);
-                        $mmlist->subscribe("promo" . $yearpromo);
+                        try {
+                            $mmlist = new MMList($user);
+                            $mmlist->subscribe("promo" . $yearpromo);
+                        } catch (Exception $e) {
+                            PlErrorReport::report($e);
+                            $page->trigError("L'inscription à la liste promo" . $yearpromo . " a échouée.");
+                        }
                     }
                     break;
                 case 'nl':