From 49cbf11ed23b15a016ef62d4c74ae86bf537137e Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 3 Dec 2008 22:39:11 +0000 Subject: [PATCH] forward porting UserList profile field name bug fix --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/UserList.pm | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index beebf65a2..c242d8da7 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,6 +1,7 @@ 7.6.6 - fixed #8792: Image Preview gives ERROR in Collateral Manager - fixed #8774: Forum Rich Edit no longer supports indent/outdent + - fixed #4173: fieldnames in profilefields can contain spaces 7.6.5 - security: A problem was discovered and fixed in which users could email executable attachments to a collaboration system and then when viewed online, could execute them. diff --git a/lib/WebGUI/Asset/Wobject/UserList.pm b/lib/WebGUI/Asset/Wobject/UserList.pm index 15c75620e..11bfc6179 100644 --- a/lib/WebGUI/Asset/Wobject/UserList.pm +++ b/lib/WebGUI/Asset/Wobject/UserList.pm @@ -436,8 +436,9 @@ sub view { # Query user profile data. Exclude the visitor account and users that have been deactivated. $sql = "select distinct users.userId, users.userName, userProfileData.publicProfile "; # Include remaining profile fields in the query + my $dbh = $self->session->db->dbh; foreach my $profileField (@profileFields){ - $sql .= ", userProfileData.$profileField->{fieldName}"; + $sql .= ", userProfileData." . $dbh->quote_identifier($profileField->{fieldName}); } $sql .= " from users"; $sql .= " left join userProfileData using(userId) where users.userId != '1' and users.status = 'active'";