diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-09-01 17:33:07 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-09-01 17:33:07 +0400 |
commit | d903c1f0be860bae5e48031baa6d0512a917dcbb (patch) | |
tree | 584f9135f4497d2ad0b8f6286594fcf657208b9d /plugins/Live | |
parent | dc48c3132757a6125203368207d71ac1fd32cc0f (diff) |
Refs #3490 User ID Tracker is now working:
- new user_id field to contain the raw user id value
- new &uid= tracker api parameter
- add userId to Live API output
- added integration test
Diffstat (limited to 'plugins/Live')
-rw-r--r-- | plugins/Live/Visitor.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/Live/Visitor.php b/plugins/Live/Visitor.php index b03d37e650..b9153a374d 100644 --- a/plugins/Live/Visitor.php +++ b/plugins/Live/Visitor.php @@ -39,6 +39,7 @@ class Visitor implements VisitorInterface 'idSite' => $this->getIdSite(), 'idVisit' => $this->getIdVisit(), 'visitIp' => $this->getIp(), + 'userId' => $this->getUserId(), 'visitorId' => $this->getVisitorId(), // => false are placeholders to be filled in API later @@ -84,6 +85,14 @@ class Visitor implements VisitorInterface return false; } + function getUserId() + { + if (!is_null($this->details['user_id'])) { + return $this->details['user_id']; + } + return false; + } + function getVisitServerHour() { return date('G', strtotime($this->details['visit_last_action_time'])); |