Is it safe to assume complex objects can be stored to sessionstorage?
property name=“sessionstorage” inject=“coldbox:plugin:sessionstorage”;
function blah() {
local.checkuser = userservice.getbycredentials(argumentCollection=arguments);
WriteDump(local.checkuser);
if (local.checkuser.IsValid()) {
sessionstorage.setVar(“siteuser”, local.checkuser);
sessionstorage.setVar(“authenticated”, true);
WriteDump(sessionstorage);abort;
local.returnvalue = true;
} else {
sessionstorage.deleteVar(“siteuser”);
sessionstorage.setVar(“authenticated”, false);
};
}
the dump of local.checkuser has the data I need and the IsValid() will return true. I get no errors but even that writedump(sessionstorage) shows nothing but $mixins in the instance. Am I using it incorrectly?
Then, I bounced the CF instance and this works as expected. I seem to be having to reset coldfusion an awful lot and this test site I’m working on has a total of three really basic models, a mindless interceptor and a single plugin. Very aggravating.
Mike