44,6 → 44,7 |
// ATTENTION : bien inclure la racine du site /home/telabotap/www/ et le chemin de l'api PEAR /home/telabotap/www/api/pear/ dans l'include path. |
// ATTENTION : l'ancien include_path ajouté grace à get_include_path() doit être impérativement ajouté APRÉS le chemin de l'api Pear de Papyrus! |
set_include_path($_SERVER['DOCUMENT_ROOT'].PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.PAP_CHEMIN_API_PEAR.PATH_SEPARATOR.get_include_path()); |
|
include_once 'Auth.php' ; |
include_once 'DB.php' ; |
include_once 'Net/URL.php' ; |
85,18 → 86,15 |
'passwordcol' => 'U_PASSWD', |
'cryptType' => 'md5', |
'db_fields' => '*'); |
|
// ATTENTION : bien définir le nom de la session avec la fonction PHP et le placer avant l'instanciation de l'objet AUTH! |
session_name('pap-annuaire_tela'); |
$GLOBALS['identification'] = new Auth('DB', $param_auth, 'AUTH_formulaire_login'); |
//session_name('gen_annuaire_tela'); |
//$GLOBALS['identification']->_sessionName = 'gen_annuaire_tela'; |
// ATTENTION : TODO : setSessionname ne marche pas ici. Le nom de la session n'est jamais initialisé est reste PHPSESSID |
$GLOBALS['identification']->setSessionname('gen_annuaire_tela'); |
//echo session_name().'-'.$GLOBALS['identification']->_sessionName; |
$GLOBALS['identification']->setAdvancedSecurity(PAP_AUTH_SECURITE_AVANCEE); |
// On débute une session |
$GLOBALS['identification']->start(); |
|
//echo '<pre>'.print_r($GLOBALS['identification'], true).'</pre>'; |
// On teste si la variable logout existe, si oui, on deconnecte |
if (isset($logout) && $logout != '' && $GLOBALS['identification']->checkAuth()) { |
if (isset($_REQUEST['deconnexion']) || isset($_REQUEST['logout']) || $GLOBALS['identification']->checkAuth() == false) { |
// On place les cookies avec une durée dépassée |
setcookie('spip_session', '', time() - 3600, '/actu/') ; |
setcookie('spip_admin', '', time() - 3600, '/actu/') ; |