Skip to content
Snippets Groups Projects
Commit 75fc53f1 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: add create date in object for use in triggers

parent 3448173a
Branches
Tags
No related merge requests found
...@@ -730,7 +730,7 @@ class User extends CommonObject ...@@ -730,7 +730,7 @@ class User extends CommonObject
return -1; return -1;
} }
$now=dol_now(); $this->datec = dol_now();
$error=0; $error=0;
$this->db->begin(); $this->db->begin();
...@@ -756,7 +756,7 @@ class User extends CommonObject ...@@ -756,7 +756,7 @@ class User extends CommonObject
else else
{ {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user (datec,login,ldap_sid,entity)"; $sql = "INSERT INTO ".MAIN_DB_PREFIX."user (datec,login,ldap_sid,entity)";
$sql.= " VALUES('".$this->db->idate($now)."','".$this->db->escape($this->login)."','".$this->ldap_sid."',".$this->entity.")"; $sql.= " VALUES('".$this->db->idate($this->datec)."','".$this->db->escape($this->login)."','".$this->ldap_sid."',".$this->entity.")";
$result=$this->db->query($sql); $result=$this->db->query($sql);
dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment