X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=DataObjects%2FEvents.php;h=7148867851f36fc945cd999bdc78f838905c9de9;hp=98742138b7d078f54cefeff7f1765f02a7d3e356;hb=1f47fdde4c2a266fa620902b53b08d64655f5ef2;hpb=9f7ed0f01b78a2e54833c6d17917a31857e716e0 diff --git a/DataObjects/Events.php b/DataObjects/Events.php index 98742138..71488678 100644 --- a/DataObjects/Events.php +++ b/DataObjects/Events.php @@ -334,6 +334,18 @@ class Pman_Core_DataObjects_Events extends DB_DataObject $col = isset($cols[$col]) ? $col : 'person_id'; // for BC.... - revert to using person_id $this->{$col} = $au->pid(); //$this->person_id = $au ? (!empty($au->id) ? $au->id : $au->pid()) : -1; + + $this->who = $au->name; + + if($au->tableName() == "modx_users"){ + $e = PDO_DataObject::factory('ext_data'); + $e->setFrom(array( + 'userdata_id' => $au->pid(), + )); + if($e->find(true)){ + $this->who = $e->getUserName(); + } + } } $this->person_table = $au ? $au->tableName() : ''; $this->ipaddr = isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : 'cli';