Clear mentor entry of the user when is expertise is empty.
[platal.git] / modules / auth.php
index 3781291..ca07e32 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -27,10 +27,10 @@ class AuthModule extends PLModule
             'groupex/donne-chall.php'
                                 => $this->make_hook('chall',      AUTH_PUBLIC),
             'groupex/export-econfiance.php'
-                                => $this->make_hook('econf',      AUTH_PUBLIC),
+                                => $this->make_hook('econf',      AUTH_PUBLIC, 'user', NO_HTTPS),
 
             'webservices/manageurs.php'
-                                => $this->make_hook('manageurs',  AUTH_PUBLIC),
+                                => $this->make_hook('manageurs',  AUTH_PUBLIC, 'user', NO_HTTPS),
 
             'auth-redirect.php' => $this->make_hook('redirect',   AUTH_COOKIE),
             'auth-groupex.php'  => $this->make_hook('groupex_old',    AUTH_COOKIE),
@@ -150,6 +150,7 @@ class AuthModule extends PLModule
         $gpex_challenge = $_GET["challenge"];
 
         // mise à jour de l'heure et de la machine de dernier login sauf quand on est en suid
+        $uid = S::i('uid');
         if (!isset($_SESSION['suid'])) {
             $logger = (isset($_SESSION['log']) && $_SESSION['log']->uid == $uid)
                             ? $_SESSION['log'] : new CoreLogger($uid);
@@ -180,7 +181,7 @@ class AuthModule extends PLModule
         $table_editor->describe('privkey','clé privée',false);
         $table_editor->describe('datafields','champs renvoyés',true);
         $table_editor->apply($page, $action, $id);
-    }  
+    }
 }
 
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: