Menu

Who's logged in?

Help
Kenneth G.
2007-04-18
2013-03-22
  • Kenneth G.

    Kenneth G. - 2007-04-18

    How do I determine who is logged in? I need to retrieve an array of all the users info, which I could do but I can't figure out how to determine who is actually logged in.

     
    • Justin Koivisto

      Justin Koivisto - 2007-04-18

      If I needed to find out who was logged in, I'd probably use the psa_sessions table to get that information. The value field has a serialized session array, therefore, you could find something like the following in there:

      PSA_psaun|s:7:"justink";

      That's telling me that justink is logged in. Of course, this will depend on session lifetimes and such, but the default settings for PSA limit sessions to something smaller than default php, and raise the GC methods to run much more often as well (The numbers escape me at this moment). Once you have the username, you can use other methods in PSA to get the rest of the information.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.