Fix: Try to fix trigger tha change password
This commit is contained in:
parent
388706a354
commit
d394fb621a
@ -1247,7 +1247,9 @@ class User extends CommonObject
|
|||||||
// Mise a jour
|
// Mise a jour
|
||||||
if (! $changelater)
|
if (! $changelater)
|
||||||
{
|
{
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
|
if (! is_object($this->oldcopy)) $this->oldcopy=dol_clone($this);
|
||||||
|
|
||||||
|
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
|
||||||
$sql.= " SET pass_crypted = '".$this->db->escape($password_crypted)."',";
|
$sql.= " SET pass_crypted = '".$this->db->escape($password_crypted)."',";
|
||||||
$sql.= " pass_temp = null";
|
$sql.= " pass_temp = null";
|
||||||
if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))
|
if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))
|
||||||
|
|||||||
@ -410,6 +410,8 @@ if ($action == 'update' && ! $_POST["cancel"])
|
|||||||
$edituser = new User($db);
|
$edituser = new User($db);
|
||||||
$edituser->fetch($id);
|
$edituser->fetch($id);
|
||||||
|
|
||||||
|
$edituser->oldcopy=dol_clone($edituser);
|
||||||
|
|
||||||
$ret=$edituser->setPassword($user,$_POST["password"]);
|
$ret=$edituser->setPassword($user,$_POST["password"]);
|
||||||
if ($ret < 0)
|
if ($ret < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user