Ajout du l'auto-user

This commit is contained in:
Rodolphe Quiedeville 2003-10-14 14:49:35 +00:00
parent 431c95e85e
commit 365049b802

View File

@ -78,31 +78,37 @@ if (!empty ($GLOBALS["REMOTE_USER"]))
}
else
{
require_once "Auth/Auth.php";
$params = array(
"dsn" => $conf->db->getdsn(),
"table" => "llx_user",
"usernamecol" => "login",
"passwordcol" => "pass",
"cryptType" => "none",
);
$aDol = new Auth("DB", $params, "loginFunction");
$aDol->start();
$result = $aDol->getAuth();
if ($result)
{
$user->fetch($aDol->getUsername());
if (!empty ($dolibarr_auto_user))
{
$user->fetch($dolibarr_auto_user);
}
else
{
/*
* Le début de la page est affiché par
* loginFunction
*/
print '</div></div></body></html>';
die ;
require_once "Auth/Auth.php";
$params = array(
"dsn" => $conf->db->getdsn(),
"table" => "llx_user",
"usernamecol" => "login",
"passwordcol" => "pass",
"cryptType" => "none",
);
$aDol = new Auth("DB", $params, "loginFunction");
$aDol->start();
$result = $aDol->getAuth();
if ($result)
{
$user->fetch($aDol->getUsername());
}
else
{
/*
* Le début de la page est affiché par
* loginFunction
*/
print '</div></div></body></html>';
die ;
}
}
}