From: Stéphane Jacob Date: Mon, 12 Sep 2011 13:50:02 +0000 (+0200) Subject: Fixes xnet registration. X-Git-Tag: xorg/1.1.4~55^2~14 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=250915b80097c3a97170e024bdb99560130a25d6;p=platal.git Fixes xnet registration. Signed-off-by: Stéphane Jacob --- diff --git a/modules/xnet.php b/modules/xnet.php index 2b51821..44094d8 100644 --- a/modules/xnet.php +++ b/modules/xnet.php @@ -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: diff --git a/templates/xnet/account.mail.tpl b/templates/xnet/account.mail.tpl index fae7aaf..123b691 100644 --- a/templates/xnet/account.mail.tpl +++ b/templates/xnet/account.mail.tpl @@ -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.