Fix: missing update of $conf
This commit is contained in:
parent
ce0144e645
commit
9f62ddaf36
@ -176,17 +176,20 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
|
||||
$sql = "SELECT u.rowid, u.pass, u.pass_crypted";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$numrows=$db->num_rows($resql);
|
||||
if ($numrows == 0)
|
||||
{
|
||||
// Define default setup for password encryption
|
||||
dolibarr_set_const($db, "DATABASE_PWD_ENCRYPTED", "1", 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SECURITY_SALT", dol_print_date(dol_now(), 'dayhourlog'), 'chaine', 0, '', 0); // All entities
|
||||
dolibarr_set_const($db, "MAIN_SECURITY_HASH_ALGO", 'sha1md5', 'chaine', 0, '', 0); // All entities
|
||||
}
|
||||
}
|
||||
if ($resql)
|
||||
{
|
||||
$numrows=$db->num_rows($resql);
|
||||
if ($numrows == 0)
|
||||
{
|
||||
// Define default setup for password encryption
|
||||
dolibarr_set_const($db, "DATABASE_PWD_ENCRYPTED", "1", 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SECURITY_SALT", dol_print_date(dol_now(), 'dayhourlog'), 'chaine', 0, '', 0); // All entities
|
||||
dolibarr_set_const($db, "MAIN_SECURITY_HASH_ALGO", 'sha1md5', 'chaine', 0, '', 0); // All entities
|
||||
|
||||
// Update of $conf
|
||||
$conf->setValues($db);
|
||||
}
|
||||
}
|
||||
|
||||
// Create user used to create the admin user
|
||||
$createuser=new User($db);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user