19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: identification.php,v 1.5 2004-09-23 14:31:12 jpm Exp $ |
// CVS : $Id: identification.php,v 1.6 2004-12-13 18:07:09 alex Exp $ |
/** |
* Applette : identification |
* |
38,7 → 38,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.5 $ $Date: 2004-09-23 14:31:12 $ |
*@version $Revision: 1.6 $ $Date: 2004-12-13 18:07:09 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
56,7 → 56,34 |
if ($_GEN_commun['info_auth']->gsa_ce_type_auth == 1) { |
// Si un formulaire nous renvoie en POST une variable "deconnexion", nous délogons l'utilisateur. |
if (isset($_POST['deconnexion'])) { |
$_GEN_commun['pear_auth']->logout(); |
$_GEN_commun['pear_auth']->logout(); |
// Le test suivant vérifie si une authentification SPIP est en cour, vois pap_initialise_auth.inc.php |
if (isset ($chemin_spip) && isset ($coauth) && $coauth == $auth_courante['gsab_id_auth_bdd']) { |
// On place un cookie avec une duré dépassée |
setcookie("spip_session", $id_session, time() - 3600*24, "/$chemin_cookie_spip/") ; |
setcookie("spip_admin", "@".$login, time() -3600*24, "/$chemin_cookie_spip/") ; |
|
$dirname = $GLOBALS['flag_ecrire'] ? "data/" : "ecrire/data/"; |
$dirname = $chemin_spip."/".$dirname ; |
// ne pas se zapper soi-meme |
if ($s = $GLOBALS['spip_session']) |
$fichier_session = fichier_session($s, lire_meta('alea_ephemere')); |
$fichier_session = $chemin_spip."/ecrire/".$fichier_session ; |
$dir = opendir($dirname); |
$t = time(); |
while(($item = readdir($dir)) != '') { |
$chemin = "$dirname$item"; |
if (ereg("^session_([0-9]+_)?([a-z0-9]+)\.php3$", $item, $regs)) { |
// Si c'est une vieille session, on jette |
if (($t - filemtime($chemin)) > 48 * 3600) unlink($chemin); |
// sinon voir si c'est une session du meme auteur |
else if ($regs[1] == $id_auteur.'_') { |
$zap_num ++; |
if ($zap) unlink($chemin); |
} |
} |
} |
} |
$_GEN_commun['pear_auth']->start(); |
} |
// Si un formulaire nous renvoie en POST une variable "connexion", nous logons l'utilisateur. |
84,7 → 111,7 |
// Initialisation de variable. |
$objet_pear_auth = $_GEN_commun['pear_auth']; |
$objet_pear_db = $_GEN_commun['pear_db']; |
$url = $_GEN_commun['url']->getUrl(); |
$url = $_GEN_commun['url']->getURL(); |
// Récupération des valeurs pour le login et le mot de passe |
$mot_de_passe = (! isset($_POST['password'])) ? '' : $_POST['password']; |
$login = (! isset($_POST['username'])) ? '' : $_POST['username']; |
121,7 → 148,7 |
// Amélioré la récupération des informations sur l'utilisateur. |
//$nom_utilisateur = $objet_pear_auth->getAuthData($champ_nom); |
|
$res = str_repeat(' ', 16).'<form id="form_deconnexion" action="'.$url.'" method="post">'."\n"; |
$res = str_repeat(' ', 16).'<form id="form_deconnexion" action="'.$url.'&logout=1" method="post">'."\n"; |
$res .= str_repeat(' ', 16).'<fieldset>'."\n"; |
$res .= str_repeat(' ', 20).'<legend>'.'Identification'.'</legend>'."\n"; |
// Il faudrait mettre dans la base de données le prénom et le nom ou chercher comment définir ces champs en fonction |
145,6 → 172,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.5 2004/09/23 14:31:12 jpm |
* Correction bogue sur l'identification de l'annuaire_tela. |
* |
* Revision 1.4 2004/09/23 10:53:44 jpm |
* Suppression de l'attribut size. Gestion via les css. |
* |