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

Validating a XF Session

Discussion in 'XenForo Development Discussions' started by Naatan, Dec 13, 2011.

  1. Naatan

    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.
  2. Naatan

    Naatan Well-Known Member

    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.

Share This Page