* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-require_once('platal/session.inc.php');
+require_once dirname(__FILE__).'/../../classes/Session.php';
class XnetSession
{
if (Get::has('auth')) {
return XnetSession::doAuthX();
- } else {
- global $page;
-
- $page->doLogin();
}
+
+ return false;
}
// }}}
function doAuthX() {
global $globals, $page;
- if (md5('1'.S::v('challenge').$globals->xnet->secret.Get::getInt('uid').'1') != Get::get('auth')) {
+ if (md5('1'.S::v('challenge').$globals->xnet->secret.Get::i('uid').'1') != Get::v('auth')) {
$page->kill("Erreur d'authentification avec polytechnique.org !");
}
INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type='a_vie')
INNER JOIN aliases AS a2 ON (u.user_id = a2.id AND FIND_IN_SET('bestalias',a2.flags))
WHERE u.user_id = {?} AND u.perms IN('admin','user')
- LIMIT 1", Get::getInt('uid'));
+ LIMIT 1", Get::i('uid'));
$_SESSION = array_merge($_SESSION, $res->fetchOneAssoc());
$_SESSION['auth'] = AUTH_MDP;
S::kill('challenge');
S::kill('loginX');
Get::kill('auth');
Get::kill('uid');
- $args = array();
- $path = Get::get('p');
+ $path = Get::v('p');
Get::kill('p');
+ Get::kill('PHPSESSID');
+ $args = array();
foreach($_GET as $key => $val) {
$args[] = urlencode($key).'='.urlencode($val);
}
- redirect($globals->baseurl . '/' . $path . '?' . join('&', $args));
+
+ http_redirect($globals->baseurl . '/' . $path, join('&', $args));
}
// }}}