Fix pb with DATABASE_PWD_ENCRYPTED
This commit is contained in:
parent
328641dfa8
commit
7a41a851c8
@ -58,7 +58,11 @@ if ($action == 'activate_encrypt') {
|
|||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
dolibarr_set_const($db, "DATABASE_PWD_ENCRYPTED", "1", 'chaine', 0, '', $conf->entity);
|
// On old version a bug created the constant into user entity, so we delete it to be sure, such entry won't exists. We want it in entity 0 or nowhere.
|
||||||
|
dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED", "1", 'chaine', 0, '', $conf->entity);
|
||||||
|
// We set entity=0 (all) because DATABASE_PWD_ENCRYPTED is a setup into conf file, so always shared for everybody
|
||||||
|
$entityforall = 0;
|
||||||
|
dolibarr_set_const($db, "DATABASE_PWD_ENCRYPTED", "1", 'chaine', 0, '', $entityforall);
|
||||||
|
|
||||||
$sql = "SELECT u.rowid, u.pass, u.pass_crypted";
|
$sql = "SELECT u.rowid, u.pass, u.pass_crypted";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user