Index: branches/5.0.x/core/kernel/db/cat_dbitem.php =================================================================== diff -u -r12511 -r12535 --- branches/5.0.x/core/kernel/db/cat_dbitem.php (.../cat_dbitem.php) (revision 12511) +++ branches/5.0.x/core/kernel/db/cat_dbitem.php (.../cat_dbitem.php) (revision 12535) @@ -1,6 +1,6 @@ SetDBField('Modified_date', adodb_mktime() ); $this->SetDBField('Modified_time', adodb_mktime() ); - if ($this->mode != 't' && !$this->Application->IsAdmin()) { - $owner_field = $this->Application->getUnitOption($this->Prefix, 'OwnerField'); - if (!$owner_field) { - $owner_field = 'CreatedById'; - } + $is_admin = $this->Application->IsAdmin(); + $owner_field = $this->Application->getUnitOption($this->Prefix, 'OwnerField'); + + if (!$owner_field) { + $owner_field = 'CreatedById'; + } + + if ((!$this->IsTempTable() && !$is_admin) || ($is_admin && !$this->GetDBField($owner_field))) { $this->SetDBField($owner_field, $this->Application->RecallVar('user_id')); }