X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fxnet%2Fsession.inc.php;h=e3e544e0e997fa6df4b33f34b906480f9c1162ad;hb=08d7cc452e666835373023f2ca8416e75e2cb9c5;hp=92c189ab81bfb908efdfa0dc20b312a01ccff9bb;hpb=9fcc656556e911e89ecb0d9712785a19a7025da9;p=platal.git diff --git a/include/xnet/session.inc.php b/include/xnet/session.inc.php index 92c189a..e3e544e 100644 --- a/include/xnet/session.inc.php +++ b/include/xnet/session.inc.php @@ -21,6 +21,11 @@ class XnetSession { + public function __construct() + { + self::init(); + } + // {{{ function init public static function init() @@ -29,6 +34,10 @@ class XnetSession S::init(); + if (!S::logged() && Get::has('auth')) { + XnetSession::doAuthX(); + } + if (!S::logged()) { // prevent connexion to be linked to deconnexion if (($i = strpos($_SERVER['REQUEST_URI'], 'exit')) !== false) @@ -106,14 +115,11 @@ class XnetSession public static function doAuthX() { - global $globals, $page; + global $globals; if (md5('1'.S::v('challenge').$globals->xnet->secret.Get::i('uid').'1') != Get::v('auth')) { Get::kill('auth'); - if (!$page) { - require_once 'xnet.inc.php'; - new_skinned_page('platal/index.tpl'); - } + $page =& Platal::page(); $page->kill("Erreur d'authentification avec polytechnique.org !"); }