Ajout du l'auto-user
This commit is contained in:
parent
431c95e85e
commit
365049b802
@ -78,31 +78,37 @@ if (!empty ($GLOBALS["REMOTE_USER"]))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
require_once "Auth/Auth.php";
|
if (!empty ($dolibarr_auto_user))
|
||||||
|
{
|
||||||
$params = array(
|
$user->fetch($dolibarr_auto_user);
|
||||||
"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
|
else
|
||||||
{
|
{
|
||||||
/*
|
require_once "Auth/Auth.php";
|
||||||
* Le début de la page est affiché par
|
|
||||||
* loginFunction
|
|
||||||
*/
|
|
||||||
print '</div></div></body></html>';
|
|
||||||
die ;
|
|
||||||
|
|
||||||
|
$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