Happy New Year!
[platal.git] / modules / register.php
index af6b4cc..936f8c7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -386,8 +386,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':