From d1d7fe34c2c436d96a23d5da24643686e195ae3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Wed, 20 Apr 2011 10:51:12 +0200 Subject: [PATCH] M/D do not have promotion groups and ML yet. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- modules/register.php | 26 ++++++++++++++------------ templates/register/step3.tpl | 2 ++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/modules/register.php b/modules/register.php index 9b0aafc..e2f029c 100644 --- a/modules/register.php +++ b/modules/register.php @@ -387,18 +387,20 @@ class RegisterModule extends PLModule Email::activate_storage($user, 'imap'); break; case 'ml_promo': - $r = XDB::query('SELECT id FROM groups WHERE diminutif = {?}', $yearpromo); - if ($r->numRows()) { - $asso_id = $r->fetchOneCell(); - XDB::execute('INSERT IGNORE INTO group_members (uid, asso_id) - VALUES ({?}, {?})', - $uid, $asso_id); - 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."); + if ($isX) { + $r = XDB::query('SELECT id FROM groups WHERE diminutif = {?}', $yearpromo); + if ($r->numRows()) { + $asso_id = $r->fetchOneCell(); + XDB::execute('INSERT IGNORE INTO group_members (uid, asso_id) + VALUES ({?}, {?})', + $uid, $asso_id); + 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; diff --git a/templates/register/step3.tpl b/templates/register/step3.tpl index e6e9385..ab97b27 100644 --- a/templates/register/step3.tpl +++ b/templates/register/step3.tpl @@ -115,11 +115,13 @@
de recevoir les informations importantes de l'AX.
+ {if $smarty.session.subState.edu_type eq 'X'}
de recevoir les informations plus spécifiques de ta promotion pour pouvoir participer plus facilement aux événements qu'elle organise. Nous t'inscrivons donc dans le groupe de la promotion {$smarty.session.subState.promo}.
+ {/if}
d'avoir un accès de secours aux 30 derniers jours d'emails reçus sur ton adresse Polytechnique.org. -- 2.1.4