Closed (fixed)
Project:
Webform
Version:
5.x-2.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Jun 2008 at 10:39 UTC
Updated:
15 Jul 2008 at 14:52 UTC
We have a strange bug where random user profile data is shown to annonymous users.
We have user name and contact details as part of the webform. In the default value, we are using the syntax for the profile module. For example, for the first name field, we use %profile[profile_firstname], first line of address is %profile[profile_address1] and so on.
This works fine when users are logged in, as it always shows their details. However, if a user is annonymous, they are seeing another users details instead.
We have tested it on Webform 2 and 1.10 and have the same problem.
Any ideas?
Comments
Comment #1
quicksketchThanks! Looks like the profile data was being loaded regardless, even if the user wasn't logged in. The data shouldn't have been totally random, it was pulling out the first record of profile data that it could find, where the UID == 0. Although, I'm not sure why there'd be data in your profile tables for UID 0.
Either way, we shouldn't have been loading the profile data at all for anonymous users, so I fixed it in this patch:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/webform/web...
It'll be fixed in 2.1, which I'm trying to release shortly.
Comment #2
blairski commentedWow, thanks for the quick response!
I've tested the patch and it works. Fantastic!
Just one thing though.
Now it is showing the tags for anonymous users.. eg %profile[profile_firstname] rather then just blank fields.
Is this expected?
Comment #3
quicksketchOh dang! Right, we should delete that entirely. Thanks, I'll give this another shot.
Comment #4
quicksketchAlright, here's a different approach where the replacement still occurs but the profile isn't loaded. Let me know if this gives you any trouble.
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/webform/web...
Comment #5
blairski commentedHi Quicksketch,
Just tested the new v2.1 and it is perfect and the bug is clear. No problems at all. Thanks very much for sorting that out so quickly. Very much appreciated.
Blairski
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.