This is embarrassing. I've been a ColdFusion developer for 13 years and I've never had a reason to use client management over session management. Anyway, I've set up a database and datasource in CFAdmin, then selected that datasource as the default storage mechanism for client sessions.
Then I went through all my code and global-replaced all my session scopes with clients scope.
Top of my application.cfm looks like:
<CFAPPLICATION
NAME="blah"
SESSIONMANAGEMENT="No"
SESSIONTIMEOUT=#CreateTimeSpan(0,2,0,0)#
CLIENTMANAGEMENT="Yes"
CLIENTSTORAGE="sys_blah"
>
In my application.cfm, I had previously set a few variables globally related to session authentication, i.e.
<cfparam name="session.user.authenticated" default="0">
<cfparam name="session.user.id" default="">
However, now that these are written as
<cfparam name="client.user.authenticated" default="0">
<cfparam name="client.user.id" default="">
I get an error:
Element USER is undefined in CLIENT.
What might I be doing wrong?
I can see the client vars going into the newly-created database. I'm on CF12
<cfdump var="#client#'>gets you started. Your embarrassment is justified for not knowing this after 13 years. - Dan Bracukuser.id, rather than a structure nameduser, with a key namedid. Of course, that brings us back around to Dan's first point, which I do agree with :) You should usecfdumpto confirm or disprove that theory. - Leigh