From 3da6c0f47413ed5521317c043204171bcda3dbb5 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sat, 30 Aug 2003 22:08:36 +0000 Subject: [PATCH] Suppression du message dans le die de l'auth --- htdocs/main.inc.php3 | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/htdocs/main.inc.php3 b/htdocs/main.inc.php3 index 61401e2822a..5d2b76719d6 100644 --- a/htdocs/main.inc.php3 +++ b/htdocs/main.inc.php3 @@ -78,12 +78,14 @@ $user = new User($db); //XAVIER DUTOIT 18/09/2003 : si l'utilisateur n'est pas authentifié apache, on essaie pear Auth if (!empty ($GLOBALS["REMOTE_USER"])) - $user->fetch($GLOBALS["REMOTE_USER"]); - else +{ + $user->fetch($GLOBALS["REMOTE_USER"]); +} +else { require_once "Auth/Auth.php"; $params = array( - "dsn" => $conf->db->getdsn (), + "dsn" => $conf->db->getdsn(), "table" => "llx_user", "usernamecol" => "login", "passwordcol" => "pass", @@ -91,11 +93,14 @@ if (!empty ($GLOBALS["REMOTE_USER"])) ); $a = new Auth("DB", $params, "loginFunction"); $a->start(); - if ($a->getAuth()) { - $user->fetch($a->getUsername()); - } + if ($a->getAuth()) + { + $user->fetch($a->getUsername()); + } else - die ("Veuillez vous authentifier"); + { + die ; + } } /* * Definition de toutes les Constantes globales d'envirronement