Skip to main content
Inspiring
November 3, 2008
Question

Whos logged in

  • November 3, 2008
  • 2 replies
  • 715 views
Has anyone got a script that does this?

Id like a logged in page, where it lists users logged into my app.

Thanks in advance
    This topic has been closed for replies.

    2 replies

    Inspiring
    November 3, 2008
    I think the following link will provide insight on how to do that (for me also):

    http://awads.net/wp/2005/06/20/how-to-track-user-sessions-in-coldfusion
    tclaremont
    Inspiring
    November 3, 2008
    Since I am required to log every hit on my intranet application, I simply query my Hits database. Using session varialbes you can get a pretty good handle on who is currently logged in. I think there are tags in the community section of the Adobe website. Do a google search on "currently logged in" and "session variables" and you are sure to be on your way.
    matthiscoAuthor
    Inspiring
    November 3, 2008
    Thanks for your reply

    I can find out how to display the amount of sessions, but not whos logged in.

    Anyone?
    Inspiring
    November 3, 2008
    If you have users logged in then there is a session connected with their account, when they log out that session is deleted. So if you know how your sessions are set and with what kind of named variables, then you can check on that variables and link them to the logged in user data that is in the db.

    For example, when there is a session set with:

    <cfset SESSION.username=username from database>

    then there is a session.username variable active which holds the value of the username from the database.

    These values corresponds which enable you to match those.