Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Whos logged in

Explorer ,
Nov 03, 2008 Nov 03, 2008
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
639
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 03, 2008 Nov 03, 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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 03, 2008 Nov 03, 2008
Thanks for your reply

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

Anyone?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 03, 2008 Nov 03, 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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 03, 2008 Nov 03, 2008
Thanks for your reply.

I'd rather not use a DB to reference a user ID. I'd rather keep it to the initial session itself, how do think I could do this? Use a struct assigned to a session variable, that contains the user name I can display on my logged in page?

Thansk again
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 03, 2008 Nov 03, 2008
LATEST
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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources