I have a feedback form that I've built in Contour 3.0.12 and I'd like to record the current user's details (e.g. name or network logon - it's an internal site). We have another internal site that I didn't develop where this is all working; there's a field on the form with the default value set to [%UserID].
I've set a default value of [%UserID] on my form but the field still shows up blank. After comparing the Web.config across both sites, I've made a few changes to my <system.web> section:
I've added <identity impersonate="true" /> I've changed <allow users=?" /> to <deny users="?" /> in the <authorization> section I've changed <authentication mode="Forms"> to <authentication mode="Windows">
I've also added the following to <system.webServer>:
That seems to cover everything authentication-related in Web.config so I'm not sure where else to look. Google isn't finding much when I search for "umbraco contour [%userid]" so I'm at a bit of a loss as to where to go now. I've probably missed something simple; can anyone tell me what?
Aha! I didn't realise that [%UserID] was something custom so I hadn't been looking in the right place. I found a staff DLL plus a UserID.xslt which I copied onto my new site and it's all working now. I probably "should" be using members but at the moment I'm just happy to have it working.
Get current user ID
Hi,
I have a feedback form that I've built in Contour 3.0.12 and I'd like to record the current user's details (e.g. name or network logon - it's an internal site). We have another internal site that I didn't develop where this is all working; there's a field on the form with the default value set to [%UserID].
I've set a default value of [%UserID] on my form but the field still shows up blank. After comparing the Web.config across both sites, I've made a few changes to my <system.web> section:
I've added <identity impersonate="true" />
I've changed <allow users=?" /> to <deny users="?" /> in the <authorization> section
I've changed <authentication mode="Forms"> to <authentication mode="Windows">
I've also added the following to <system.webServer>:
That seems to cover everything authentication-related in Web.config so I'm not sure where else to look. Google isn't finding much when I search for "umbraco contour [%userid]" so I'm at a bit of a loss as to where to go now. I've probably missed something simple; can anyone tell me what?
Thanks :)
Comment author was deleted
Hmm looks like they are fetching the UserID session variable so that needs to be populated...
Contour should store the member id by default if you are using Umbraco members...
Aha! I didn't realise that [%UserID] was something custom so I hadn't been looking in the right place. I found a staff DLL plus a UserID.xslt which I copied onto my new site and it's all working now. I probably "should" be using members but at the moment I'm just happy to have it working.
Thanks :)
Comment author was deleted
Ok glad it's working now :)
is working on a reply...