X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fxnetsession.php;h=27ed4d8b638549643b29121c90d5d462a8ddf932;hb=a67a14b4ab7ea2661f7cdbd1e201be6a0aaf6193;hp=ceaa331375fed11818cbf514688e90a6b478993c;hpb=ed92ea696e042eb9b2d0efcc4731fdf89fb17924;p=platal.git diff --git a/classes/xnetsession.php b/classes/xnetsession.php index ceaa331..27ed4d8 100644 --- a/classes/xnetsession.php +++ b/classes/xnetsession.php @@ -1,6 +1,6 @@ trigErrorRedirect('Ce formulaire d\'authentification est réservé aux extérieurs à la communauté polytechnicienne.', ''); + } + + $user = parent::doAuth(AUTH_MDP); + if (is_null($user)) { + return false; + } + if (!parent::checkAuth(AUTH_MDP) || !parent::startSessionAs($user, AUTH_MDP)) { + $this->destroy(); + return false; + } + } + global $globals; if (!S::logged() && $globals->xnet->auth_baseurl) { // prevent connection to be linked to disconnection