This question has been answered by m.engel. See the first response.
$this->object->set('editedby',$this->modx->user->get('id'));
$this->object->set('createdby',$this->modx->user->get('id'));
public function save($cacheFlag = null) {
/* set createdon/editedon */
$now = new DateTime();
$type = $this->isNew() ? 'created' : 'edited';
$this->set($type.'on',$now->format('Y-m-d h:i:s'));
if ($this->xpdo instanceof modX && $this->xpdo->user) {
$this->set($type.'by',$this->xpdo->user->get('id'));
}
return parent :: save($cacheFlag);
}Doodle has extended the xPDOObject below model/doodles/doodle.class.php
public function save($cacheFlag = null) { /* set createdon/editedon */ $now = new DateTime(); $type = $this->isNew() ? 'created' : 'edited'; $this->set($type.'on',$now->format('Y-m-d h:i:s')); if ($this->xpdo instanceof modX && $this->xpdo->user) { $this->set($type.'by',$this->xpdo->user->get('id')); } return parent :: save($cacheFlag); }