Fix: Try to fix trigger tha change password

This commit is contained in:
Laurent Destailleur 2011-11-02 18:05:45 +01:00
parent 388706a354
commit d394fb621a
2 changed files with 5 additions and 1 deletions

View File

@ -1247,7 +1247,9 @@ class User extends CommonObject
// Mise a jour
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.= " pass_temp = null";
if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))

View File

@ -410,6 +410,8 @@ if ($action == 'update' && ! $_POST["cancel"])
$edituser = new User($db);
$edituser->fetch($id);
$edituser->oldcopy=dol_clone($edituser);
$ret=$edituser->setPassword($user,$_POST["password"]);
if ($ret < 0)
{