Fixes xnet registration.
authorStéphane Jacob <sj@m4x.org>
Mon, 12 Sep 2011 13:50:02 +0000 (15:50 +0200)
committerStéphane Jacob <sj@m4x.org>
Mon, 12 Sep 2011 13:50:02 +0000 (15:50 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/xnet.php
templates/xnet/account.mail.tpl

index 2b51821..44094d8 100644 (file)
@@ -31,6 +31,8 @@ class XnetModule extends PLModule
             'groups'       => $this->make_hook('groups',       AUTH_PUBLIC),
             'groupes.php'  => $this->make_hook('groups2',      AUTH_PUBLIC),
             'plan'         => $this->make_hook('plan',         AUTH_PUBLIC),
+            // Should be removed in a future release as links will have expired anyway.
+            'register/ext' => $this->make_hook('register_ext', AUTH_PUBLIC),
             'photo'        => $this->make_hook('photo',        AUTH_MDP, 'groups'),
             'autologin'    => $this->make_hook('autologin',    AUTH_MDP, 'groups'),
             'edit'         => $this->make_hook('edit',         AUTH_MDP, 'groups'),
@@ -275,6 +277,10 @@ class XnetModule extends PLModule
         $page->assign('user', $user);
     }
 
+    function handler_register_ext($page, $hash = null)
+    {
+        http_redirect(Platal::globals()->xnet->xorg_baseurl . 'register/ext/' . $hash);
+    }
 }
 
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
index fae7aaf..123b691 100644 (file)
@@ -37,7 +37,7 @@ mot de passe : celui que vous choisirez
 
 Vous pouvez, dès à présent et pendant une période d'un mois, activer votre compte en cliquant sur le lien suivant :
 
-http://www.polytechnique.net/register/ext/{$hash}
+{$globals->baseurl}/register/ext/{$hash}
 
 Si le lien ne fonctionne pas, copiez intégralement ce lien dans la barre d'adresse de votre navigateur.