Line 19... |
Line 19... |
19 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | You should have received a copy of the GNU Lesser General Public |
|
20 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | License along with this library; if not, write to the Free Software |
|
21 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
22 |
// | |
|
22 |
// | |
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
24 |
// CVS : $Id: pap_initialise_auth.inc.php,v 1.18 2005-07-07 09:15:36 alexandre_tb Exp $
|
24 |
// CVS : $Id: pap_initialise_auth.inc.php,v 1.19 2005-09-20 17:01:22 ddelon Exp $
|
25 |
/**
|
25 |
/**
|
26 |
* Initialisation de l'authentification.
|
26 |
* Initialisation de l'authentification.
|
27 |
*
|
27 |
*
|
28 |
* Suite à la recherche des informations depuis la base de données nous initialisons
|
28 |
* Suite à la recherche des informations depuis la base de données nous initialisons
|
29 |
* l'authentification des utilisateurs si le site l'utilise.
|
29 |
* l'authentification des utilisateurs si le site l'utilise.
|
Line 35... |
Line 35... |
35 |
//Auteur original :
|
35 |
//Auteur original :
|
36 |
*@author Alexandre GRANIER <alex@tela-botanica.org>
|
36 |
*@author Alexandre GRANIER <alex@tela-botanica.org>
|
37 |
//Autres auteurs :
|
37 |
//Autres auteurs :
|
38 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
38 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
39 |
*@copyright Tela-Botanica 2000-2004
|
39 |
*@copyright Tela-Botanica 2000-2004
|
40 |
*@version $Revision: 1.18 $ $Date: 2005-07-07 09:15:36 $
|
40 |
*@version $Revision: 1.19 $ $Date: 2005-09-20 17:01:22 $
|
41 |
// +------------------------------------------------------------------------------------------------------+
|
41 |
// +------------------------------------------------------------------------------------------------------+
|
42 |
*/
|
42 |
*/
|
Line 43... |
Line 43... |
43 |
|
43 |
|
44 |
// +------------------------------------------------------------------------------------------------------+
|
44 |
// +------------------------------------------------------------------------------------------------------+
|
Line 80... |
Line 80... |
80 |
// Ajout des valeurs communes aux différents type d'auth
|
80 |
// Ajout des valeurs communes aux différents type d'auth
|
81 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_nom'] = $ligne_auth->gsa_nom;
|
81 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_nom'] = $ligne_auth->gsa_nom;
|
82 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_abreviation'] = $ligne_auth->gsa_abreviation;
|
82 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_abreviation'] = $ligne_auth->gsa_abreviation;
|
83 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_ce_type_auth'] = $ligne_auth->gsa_ce_type_auth;
|
83 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_ce_type_auth'] = $ligne_auth->gsa_ce_type_auth;
|
Line -... |
Line 84... |
- |
|
84 |
|
84 |
|
85 |
|
85 |
if ($ligne_auth->gsa_id_auth == $GLOBALS['_GEN_commun']['info_site']->gs_ce_auth) {
|
86 |
if ($ligne_auth->gsa_id_auth == $GLOBALS['_GEN_commun']['info_site']->gs_ce_auth) {
|
86 |
$GLOBALS['_GEN_commun']['info_auth'] = $ligne_auth;
|
87 |
$GLOBALS['_GEN_commun']['info_auth'] = $ligne_auth;
|
Line 87... |
Line 88... |
87 |
}
|
88 |
}
|
Line 108... |
Line 109... |
108 |
$GLOBALS['_GEN_commun']['info_auth_bdd']->$attr[0] = (isset($attr[1]) ? $attr[1] : '');
|
109 |
$GLOBALS['_GEN_commun']['info_auth_bdd']->$attr[0] = (isset($attr[1]) ? $attr[1] : '');
|
109 |
}
|
110 |
}
|
110 |
}
|
111 |
}
|
111 |
}
|
112 |
}
|
112 |
}
|
113 |
}
|
- |
|
114 |
|
113 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth] = array_merge($GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth], $tab_auth_bdd);
|
115 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth] = array_merge((array)$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth], (array) $tab_auth_bdd);
|
114 |
$resultat_auth_bdd->free();
|
116 |
$resultat_auth_bdd->free();
|
115 |
} else if ($ligne_auth->gsa_ce_auth_ldap != 0) {
|
117 |
} else if ($ligne_auth->gsa_ce_auth_ldap != 0) {
|
116 |
//Identification via LDAP :
|
118 |
//Identification via LDAP :
|
117 |
$requete_auth_ldap = 'SELECT * '.
|
119 |
$requete_auth_ldap = 'SELECT * '.
|
118 |
'FROM gen_site_auth_ldap '.
|
120 |
'FROM gen_site_auth_ldap '.
|
Line 124... |
Line 126... |
124 |
: '';
|
126 |
: '';
|
125 |
$tab_auth_ldap = $resultat_auth_ldap->fetchRow(DB_FETCHMODE_OBJECT);
|
127 |
$tab_auth_ldap = $resultat_auth_ldap->fetchRow(DB_FETCHMODE_OBJECT);
|
126 |
if ($ligne_auth->gsa_id_auth == $_GEN_commun['info_site']->gs_ce_auth) {
|
128 |
if ($ligne_auth->gsa_id_auth == $_GEN_commun['info_site']->gs_ce_auth) {
|
127 |
$GLOBALS['_GEN_commun']['info_auth_ldap'] = $tab_auth_ldap;
|
129 |
$GLOBALS['_GEN_commun']['info_auth_ldap'] = $tab_auth_ldap;
|
128 |
}
|
130 |
}
|
129 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth] = array_merge($GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth], $tab_auth_ldap);
|
131 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth] = array_merge((array) $GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth], (array) $tab_auth_ldap);
|
130 |
$resultat_auth_ldap->free();
|
132 |
$resultat_auth_ldap->free();
|
131 |
} else {
|
133 |
} else {
|
132 |
die('ERREUR Papyrus : impossible de trouver les information authentification. <br />'.
|
134 |
die('ERREUR Papyrus : impossible de trouver les information authentification. <br />'.
|
133 |
'Identifiant auth : '.$ligne_auth->gs_ce_auth.'<br />'.
|
135 |
'Identifiant auth : '.$ligne_auth->gs_ce_auth.'<br />'.
|
134 |
'Ligne n° : '. __LINE__ .'<br />'.
|
136 |
'Ligne n° : '. __LINE__ .'<br />'.
|
Line 306... |
Line 308... |
306 |
}
|
308 |
}
|
Line 307... |
Line 309... |
307 |
|
309 |
|
308 |
|
310 |
|
- |
|
311 |
/* +--Fin du code ---------------------------------------------------------------------------------------+
|
- |
|
312 |
* $Log: not supported by cvs2svn $
|
- |
|
313 |
* Revision 1.18 2005/07/07 09:15:36 alexandre_tb
|
- |
|
314 |
* mise en place de la co-authentification Wikini - papyrus.
|
309 |
/* +--Fin du code ---------------------------------------------------------------------------------------+
|
315 |
* - ajout d'une requete pour récupérer le mot de passe
|
310 |
* $Log: not supported by cvs2svn $
|
316 |
*
|
311 |
* Revision 1.17 2005/04/27 15:06:21 alex
|
317 |
* Revision 1.17 2005/04/27 15:06:21 alex
|
312 |
* ajout de l'authentification wiki.
|
318 |
* ajout de l'authentification wiki.
|
313 |
*
|
319 |
*
|