Fix: active module user just in install mode
This commit is contained in:
parent
2a39d44657
commit
871a987e7a
@ -108,6 +108,9 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade")
|
|||||||
$db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port);
|
$db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port);
|
||||||
$ok = 0;
|
$ok = 0;
|
||||||
|
|
||||||
|
// If first install
|
||||||
|
if ($_POST["action"] == "set")
|
||||||
|
{
|
||||||
// Active module user
|
// Active module user
|
||||||
$modName='modUser';
|
$modName='modUser';
|
||||||
$file = $modName . ".class.php";
|
$file = $modName . ".class.php";
|
||||||
@ -116,9 +119,6 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade")
|
|||||||
$objMod = new $modName($db);
|
$objMod = new $modName($db);
|
||||||
$objMod->init();
|
$objMod->init();
|
||||||
|
|
||||||
// If first install
|
|
||||||
if ($_POST["action"] == "set")
|
|
||||||
{
|
|
||||||
if ($db->connected == 1)
|
if ($db->connected == 1)
|
||||||
{
|
{
|
||||||
$conf->setValues($db);
|
$conf->setValues($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user