From 7cb535f2250ffc067ba542f105245e59b500387e Mon Sep 17 00:00:00 2001 From: Alban Durrheimer Date: Fri, 12 May 2023 16:29:09 +0200 Subject: [PATCH] Edit ticket class to create without fk_user_create --- htdocs/ticket/class/ticket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 158f3e30e2f21..cf7c1f19a334f 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -505,7 +505,7 @@ public function create($user, $notrigger = 0) $sql .= " ".($this->fk_soc > 0 ? $this->db->escape($this->fk_soc) : "null").","; $sql .= " ".($this->fk_project > 0 ? $this->db->escape($this->fk_project) : "null").","; $sql .= " ".(!isset($this->origin_email) ? 'NULL' : "'".$this->db->escape($this->origin_email)."'").","; - $sql .= " ".($this->fk_user_create > 0 ? $this->fk_user_create : ($user->id > 0 ? $user->id : 'NULL')).","; + $sql .= " ".(!isset($this->fk_user_create) ? ($user->id > 0 ? $user->id : 'NULL') : ($this->fk_user_create > 0 ? $this->fk_user_create : 'NULL')).","; $sql .= " ".($this->fk_user_assign > 0 ? $this->fk_user_assign : 'NULL').","; $sql .= " ".(empty($this->email_msgid) ? 'NULL' : "'".$this->db->escape($this->email_msgid)."'").","; $sql .= " ".(empty($this->email_date) ? 'NULL' : "'".$this->db->idate($this->email_date)."'").",";