PDA

View Full Version : Authenticate User - Session Variable Not Being Set


jon245706
04-09-2009, 05:07 AM
I am using the WA Authenticate User extension.

I have noticed that if (in the extension) I try to get it to set a session variable from a database Boolean field, the session variable only gets set if the value is True. If it is null then the session variable doesn't get created at all.

I think the code affected is:

For idx =0 To UBound(WA_Auth_Parameter.Item("sessionColumns"))
Session(WA_Auth_Parameter.Item("sessionNames")(idx)) = cStr(WA_Auth_loginRS.Fields.Item(WA_Auth_Parameter .Item("sessionColumns")(idx)).Value)
Next

The CStr (on the field value) seems to be causing the problem, as you can't use CStr with Null values.

Does anyone have a workaround for this ?

Ray Borduin
04-09-2009, 07:11 AM
Remove the cStr?

or maybe add an IF statement to catch the null case.