merge xmlrpc stuff, and put it in classes/
[platal.git] / modules / auth.php
index cda2bdc..e3571c0 100644 (file)
@@ -48,12 +48,11 @@ class AuthModule extends PLModule
     {
         global $globals;
 
-        require_once 'platal/xmlrpc-client.inc.php';
         require_once 'lists.inc.php';
 
         $cle = $globals->core->econfiance;
 
-        if (Session::get('chall') && $_GET['PASS'] == md5(Session::get('chall').$cle)) {
+        if (S::v('chall') && $_GET['PASS'] == md5(S::v('chall').$cle)) {
 
             $res  = XDB::query("SELECT password FROM auth_user_md5 WHERE user_id=10154");
             $pass = $res->fetchOneCell();
@@ -120,7 +119,7 @@ class AuthModule extends PLModule
 
     function handler_redirect(&$page)
     {
-        redirect(Env::get('dest', '/'));
+        http_redirect(Env::get('dest', '/'));
     }
 
     function handler_groupex(&$page)
@@ -154,12 +153,12 @@ class AuthModule extends PLModule
         while (list($privkey,$name,$datafields) = $res->next()) {
             if (md5($gpex_challenge.$privkey) == $gpex_pass) {
                 $returl = $gpex_url.gpex_make_params($gpex_challenge,$privkey,$datafields);
-                redirect($returl);
+                http_redirect($returl);
             }
         }
 
         /* si on n'a pas trouvĂ©, on renvoit sur x.org */
-        redirect('https://www.polytechnique.org/');
+        http_redirect('https://www.polytechnique.org/');
     }
 }