$userobject would need globalized. What exactly are you trying to do/achieve?
How do I do that?
phpbb/sessions.phpexactly is it you are adjusting? What line of the file?
core.session_create_afterevent you can get the user id from which you can do a sql query to get the data that you want. You cannot get either of those pieces of data directly from that that file.