Skip to main content
AlHolden
Inspiring
May 21, 2010
Answered

How to get session vars of another or any current user

  • May 21, 2010
  • 1 reply
  • 1060 views

We all should know that the syntax session.varname will get or set a session variable for the one user currently making the request.

But can we write a method to get the session structure for ANY given user, when provided with a valid identifier like sessionID?

Don't everybody all yell at once now.

This topic has been closed for replies.
Correct answer Adam Cameron.

Google "coldfusion sessiontracker"... there's a bunch of stuff...

--

Adam

1 reply

Adam Cameron.Correct answer
Inspiring
May 21, 2010

Google "coldfusion sessiontracker"... there's a bunch of stuff...

--

Adam

AlHolden
AlHoldenAuthor
Inspiring
May 21, 2010

Ah HA! I knew there was a way, it was just a matter of not knowing the magic phrase to search for (kinda like learning ActionScript).

Plain web service calls work just fine, but when my Flex app makes a Remote Object call to a cfc, my ColdFusion API always triggers onSessionStart, and has no apparent knowledge of the session variables that are already there for this Flex user (like the ones authorizing access to the API).

I figured the fix was to provide the sessionID in my initial LogIn method, keep that on the Flex side, then pass it back in the RO call - where sessionTracker could dig up the needed info?

Or my RO setup is just missconfigured?