$globals->menu->addPrivateEntry(XOM_CUSTOM, 10, 'Mon profil', 'profil.php');
$globals->menu->addPrivateEntry(XOM_CUSTOM, 20, 'Mes contacts', 'carnet/mescontacts.php');
$globals->menu->addPrivateEntry(XOM_CUSTOM, 30, 'Mon carnet', 'carnet/');
- $globals->menu->addPrivateEntry(XOM_CUSTOM, 40, 'Mon mot de passe', 'motdepasse.php');
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 40, 'Mon mot de passe', 'password');
$globals->menu->addPrivateEntry(XOM_CUSTOM, 50, 'Mes préférences', 'preferences');
$globals->menu->addPrivateEntry(XOM_GROUPS, 10, 'Trombi/Site promo', 'trombipromo.php');
+++ /dev/null
-<?php
-/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
- * http://opensource.polytechnique.org/ *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the Free Software *
- * Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
- ***************************************************************************/
-
-require_once('xorg.inc.php');
-
-if (Post::has('response2')) {
- require_once('secure_hash.inc.php');
- $password = Post::get('response2');
- $_SESSION['password'] = $password;
-
- $globals->xdb->execute('UPDATE auth_user_md5 SET password={?} WHERE user_id={?}', $password, Session::getInt('uid'));
-
- $log =& Session::getMixed('log');
- $log->log('passwd', '');
-
- if (Cookie::get('ORGaccess')) {
- setcookie('ORGaccess', hash_encrypt($password), (time()+25920000), '/', '' ,0);
- }
-
- new_skinned_page('motdepasse.success.tpl', AUTH_MDP);
- $page->run();
-}
-
-new_skinned_page('motdepasse.tpl', AUTH_MDP);
-$page->addJsLink('javascript/motdepasse.js');
-$page->assign('xorg_title','Polytechnique.org - Mon mot de passe');
-$page->run();
-?>
// Liens apparaissant toujours
$pub_tjs = array(
- "motdepasse.php" => "Changer mon mot de passe" ,
- "Docs/Dons" => "Faire un don à l'association Polytechnique.org"
+ 'password' => 'Changer mon mot de passe' ,
+ 'Docs/Dons' => 'Faire un don à l\'association Polytechnique.org'
) ;
// Liens apparaissant de façon aléatoire
$pub_rnd = array(
- "newsletter/show.php?nid=last" => "Afficher la dernière newsletter" ,
- "http://www.polytechnique.net" => "Vers les autres sites polytechniciens" ,
+ 'newsletter/show.php?nid=last' => 'Afficher la dernière newsletter' ,
+ 'http://www.polytechnique.net' => 'Vers les autres sites polytechniciens' ,
"trombipromo.php?xpromo={$_SESSION["promo"]}" => "Voir le trombi de ma promo" ,
- "banana/" => "Un petit tour du côté des forums !!"
+ 'banana/' => 'Un petit tour du côté des forums !!'
) ;
?>
{
return array(
'preferences' => $this->make_hook('prefs', AUTH_COOKIE),
+ 'password' => $this->make_hook('password', AUTH_MDP),
'skin' => $this->make_hook('skin', AUTH_COOKIE),
);
}
return PL_OK;
}
+ function handler_password(&$page)
+ {
+ global $globals;
+
+ if (Post::has('response2')) {
+ require_once 'secure_hash.inc.php';
+
+ $_SESSION['password'] = $password = Post::get('response2');
+
+ $globals->xdb->execute('UPDATE auth_user_md5
+ SET password={?}
+ WHERE user_id={?}', $password,
+ Session::getInt('uid'));
+
+ $log =& Session::getMixed('log');
+ $log->log('passwd', '');
+
+ if (Cookie::get('ORGaccess')) {
+ setcookie('ORGaccess', hash_encrypt($password), (time()+25920000), '/', '' ,0);
+ }
+
+ $page->changeTpl('motdepasse.success.tpl');
+ $page->run();
+ }
+
+ $page->changeTpl('motdepasse.tpl');
+ $page->addJsLink('javascript/motdepasse.js');
+ $page->assign('xorg_title','Polytechnique.org - Mon mot de passe');
+
+ return PL_OK;
+ }
+
function handler_skin(&$page)
{
global $globals;
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* Copyright (C) 2003-2006 Polytechnique.org *}
-{* http://opensource.polytechnique.org/ *}
-{* *}
-{* This program is free software; you can redistribute it and/or modify *}
-{* it under the terms of the GNU General Public License as published by *}
-{* the Free Software Foundation; either version 2 of the License, or *}
-{* (at your option) any later version. *}
-{* *}
-{* This program is distributed in the hope that it will be useful, *}
-{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
-{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
-{* GNU General Public License for more details. *}
-{* *}
-{* You should have received a copy of the GNU General Public License *}
-{* along with this program; if not, write to the Free Software *}
-{* Foundation, Inc., *}
-{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
-{* *}
-{**************************************************************************}
-
-<h1>Dernière étape</h1>
-<p>
- Tu as maintenant accès au site en utilisant les paramètres reçus par mail.
- Ton adresse électronique à vie <strong>{$forlife}@polytechnique.org</strong>
- est déjà ouverte, essaie-la !
-</p>
-<p>
- Remarque: m4x.org est un domaine "discret" qui veut dire "mail for X" et
- qui comporte exactement les mêmes adresses que le domaine polytechnique.org.
-</p>
-<p>
-<strong><a href="{#globals.baseurl#}/motdepasse.php">Clique ici pour changer ton mot de passe.</a></strong>
-</p>
-<p>
- N'oublie pas : si tu perds ton mot de passe, nous n'avons aucun engagement, en
- particulier en termes de rapidité, mais pas seulement, à te redonner accès au
- site. Cela peut prendre plusieurs semaines, les pertes de mot de passe sont
- traitées avec la priorité minimale.
-</p>
-
-{* vim:set et sw=2 sts=2 sws=2: *}
</tr>
<tr class="impair">
<td>
- <h3><a href="{"motdepasse.php"|url}">Changer mon mot de passe pour le site</a></h3>
+ <h3><a href="{rel}/password">Changer mon mot de passe pour le site</a></h3>
<div class='explication'>
permet de changer ton mot de passe pour accéder au site Polytechnique.org
</div>