• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Validating a XF Session

Naatan

Well-known member
#1
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.
 

Naatan

Well-known member
#2
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.