projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9f7ed0f
)
DataObjects/Events.php
author
KH Lau
<khlau@roojs.com>
Fri, 27 Oct 2017 08:55:55 +0000
(16:55 +0800)
committer
KH Lau
<khlau@roojs.com>
Fri, 27 Oct 2017 08:55:55 +0000
(16:55 +0800)
DataObjects/Events.php
patch
|
blob
|
history
diff --git
a/DataObjects/Events.php
b/DataObjects/Events.php
index
9874213
..
7148867
100644
(file)
--- 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;
$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';
}
$this->person_table = $au ? $au->tableName() : '';
$this->ipaddr = isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : 'cli';