mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Ajout du l'auto-user
This commit is contained in:
parent
431c95e85e
commit
365049b802
|
|
@ -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 ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user