|
Re: [speckcms] problem reading group user belongs to
>We are having an intermittent problem with one of our sites;
>www.icgp.ie. Sometimes when a user logs in, speck doesn't pick up
>the group the user belongs to. I know this because we are using
>request.speck.session.groups in a query and that query is being
>passed an empty string. It's as if the user hasn't been assigned to
>a group which I know they have.
when a user logs in, spApp calls spUserGet and copies the values from the
returned structure into session scope. Session.speck is duplicated into
request.speck.session for each request to avoid scope locking elsewhere.
You can check that spUserGet is returning the correct values to spApp by
just calling spUserGet on a test template and dumping the returned
structure, eg.
<cf_spUserGet user="mwoods" r_stUser="stUser">
<cfdump var=#stUser#>
tbh, if this works once properly, it should work repeatedly as the process
will be the same each time.
When speck doesn't appear to be correctly retrieving the groups for a user,
does the user still manage to log in correctly? To be sure the user has
logged in correctly, you should be checking that the value of
request.speck.session.auth eq "logon". Might be an idea to knock up a test
template that just outputs this value and when the user in question is
having a problem logging in and getting assigned the correct group
memberships, get them to open the test template and note the value of
request.speck.session.auth. If it's still "cookie" when they are having the
problem with group membership, then they haven't logged on correctly,
though I'm honestly not sure why this would be happening, would need to
take a closer look
Mark
|