From 284fb49f607b8dec04bf0234528273af3a62d04b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 29 Feb 2024 19:35:34 +0100 Subject: [PATCH] Try a better fix for #28526 --- htdocs/core/class/commonobject.class.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8bc8cb9a9c174..ed3203848bc9e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -570,6 +570,19 @@ abstract class CommonObject public $user_modification_id; + /** + * @var int ID + * @deprecated Use $user_creation_id + */ + public $fk_user_creat; + + /** + * @var int ID + * @deprecated Use $user_modification_id + */ + public $fk_user_modif; + + public $next_prev_filter; /** @@ -9048,6 +9061,11 @@ public function createCommon(User $user, $notrigger = false) } if (array_key_exists('fk_user_creat', $fieldvalues) && !($fieldvalues['fk_user_creat'] > 0)) { $fieldvalues['fk_user_creat'] = $user->id; + $this->fk_user_creat = $user->id; + } + if (array_key_exists('user_modification_id', $fieldvalues) && !($fieldvalues['user_modification_id'] > 0)) { + $fieldvalues['user_modification_id'] = $user->id; + $this->user_modification_id = $user->id; } unset($fieldvalues['rowid']); // The field 'rowid' is reserved field name for autoincrement field so we don't need it into insert. if (array_key_exists('ref', $fieldvalues)) {