Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 2144 → Rev 2145

/trunk/papyrus/pap_initialise_auth.inc.php
82,18 → 82,18
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_nom'] = $ligne_auth->gsa_nom;
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_abreviation'] = $ligne_auth->gsa_abreviation;
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_ce_type_auth'] = $ligne_auth->gsa_ce_type_auth;
 
 
if ($ligne_auth->gsa_id_auth == $GLOBALS['_GEN_commun']['info_site']->gs_ce_auth) {
$GLOBALS['_GEN_commun']['info_auth'] = $ligne_auth;
}
 
if ($ligne_auth->gsa_ce_auth_bdd != 0) {
//Identification via une base de donnée :
$requete_auth_bdd = 'SELECT * '.
'FROM gen_site_auth_bdd '.
'WHERE gsab_id_auth_bdd = '.$ligne_auth->gsa_ce_auth_bdd;
 
$resultat_auth_bdd = $db->query($requete_auth_bdd);
(DB::isError($resultat_auth_bdd))
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_auth_bdd->getMessage(), $requete_auth_bdd))
107,12 → 107,19
for ($i = 0; $i < count($arguments); $i++) {
$attr = explode('=', $arguments[$i]);
if ($attr[0] != '') {
$GLOBALS['_GEN_commun']['info_auth_bdd']->$attr[0] = (isset($attr[1]) ? $attr[1] : '');
$cle = array_shift($attr);
$valeur = '';
if (count($attr) == 1) {
$valeur = $attr[0];
} else if (count($attr) > 1) {
$valeur = implode('=', $attr);
}
$GLOBALS['_GEN_commun']['info_auth_bdd']->$cle = $valeur;
}
}
}
}
 
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth] = array_merge((array)$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth], (array) $tab_auth_bdd);
$resultat_auth_bdd->free();
} else if ($ligne_auth->gsa_ce_auth_ldap != 0) {
120,7 → 127,7
$requete_auth_ldap = 'SELECT * '.
'FROM gen_site_auth_ldap '.
'WHERE gsal_id_auth_ldap = '.$ligne_auth->gsa_ce_auth_ldap;
 
$resultat_auth_ldap = $db->query($requete_auth_ldap);
(DB::isError($resultat_auth_ldap))
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_auth_ldap->getMessage(), $requete_auth_ldap))
137,7 → 144,7
'Ligne n° : '. __LINE__ .'<br />'.
'Fichier : '. __FILE__ );
}
 
// On teste le type d'authentification
$tab_type_site = GEN_retournerTableauTypeSiteExterne($db);
$types_site = '';
178,7 → 185,7
'db_fields' => '*');
// L'authentification courrante
$GLOBALS['_GEN_commun']['pear_auth'] = new Auth('DB', $GLOBALS['_PAPYRUS_']['auth']['param_bdd'], 'GEN_afficherInfoIdentification', 1);
 
} else if ($auth_courante['gsa_ce_type_auth'] == 2) {
// Authentification via LDAP
$GLOBALS['_PAPYRUS_']['auth']['param_ldap'] = array ( 'host' => $auth_courante['gsal_serveur'],