File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 2828use \BNETDocs \Controllers \User \View as UserViewController ;
2929use \BNETDocs \Libraries \Common ;
3030use \BNETDocs \Libraries \Exceptions \ControllerNotFoundException ;
31+ use \BNETDocs \Libraries \UserSession ;
3132use \DateTime ;
3233use \DateTimeZone ;
3334use \SplObjectStorage ;
@@ -181,13 +182,16 @@ public function route(Pair &$redirect = null) {
181182 );
182183
183184 if (Common::checkIfBlizzard ()) {
185+ $ user_session = UserSession::load ($ this );
184186 Logger::logMetric ("is_blizzard_visit " , true );
185187 Logger::logEvent (
186188 "blizzard_visit " ,
187- null , // TODO: Log their user_id here if applicable
189+ ( $ user_session ? $ user_session -> user_id : null ),
188190 getenv ("REMOTE_ADDR " ),
189191 json_encode ([
190- "path " => $ this ->getRequestPathString (true )
192+ "path " => $ this ->getRequestPathString (true ),
193+ "referer " => $ this ->getRequestHeader ("Referer " ),
194+ "user_agent " => $ this ->getRequestHeader ("User-Agent " ),
191195 ])
192196 );
193197 } else {
You can’t perform that action at this time.
0 commit comments