Validating a XF Session

Naatan

Well-known member
Hi, I'm trying to develop a small web service which runs inside of XF and allows external services to validate if the users xf_session cookie is valid and return some user information related to that session. Only problem is I can't find anything that links the session to a user, the xf_sessions table only has the session and the user ip, which isn't necessarily specific to one user.

So my question is simple, how can I validate if a session id is valid (ie. currently in use) and what user is connected to that session?

Thank you.
 
My bad, it seems the session does in fact store the user_id, I was looking at an unauthenticated session, which of course does not have this entry.
 
Top Bottom