protected function _pre_store()
 {
     parent::_pre_store();
     $this->user_id = $this->login->id;
     $this->time_created->set_now();
 }
Example #2
0
 protected function _pre_store()
 {
     parent::_pre_store();
     if (!$this->exists()) {
         $this->modifier_id = $this->login->id;
         $this->time_modified->set_now();
         $this->creator_id = $this->login->id;
         $this->time_created->set_now();
     } elseif ($this->state != Abandoned) {
         // Abandoned items should be abandoned "in-place"; the abandoner is retained in the item's history.
         if ($this->update_modifier_on_change) {
             $this->modifier_id = $this->login->id;
         }
         $this->time_modified->set_now();
     }
 }