Fix the alphabetFieldSearch in the UserList, #10163

This commit is contained in:
Colin Kuskie 2009-04-14 16:14:55 +00:00
parent 6f4f5d9414
commit d2012694dc
3 changed files with 9 additions and 10 deletions

View file

@ -61,7 +61,7 @@ sub getAlphabetSearchLoop {
my $htmlEncodedLetter = encode_entities($letter);
my $searchURL = "?searchExact_".$fieldName."=".$letter."%25";
my $hasResults;
my $users = $self->session->db->read("select userId from userProfileData where lastName like '".$letter."%'");
my $users = $self->session->db->read("select userId from userProfileData where `$fieldName` like '".$letter."%'");
while (my $user = $users->hashRef){
my $showGroupId = $self->get("showGroupId");
if ($showGroupId eq '0' || ($showGroupId && $self->isInGroup($showGroupId,$user->{userId}))){
@ -535,7 +535,7 @@ sub view {
my $users = $p->getPageData($paginatePage);
foreach my $user (@$users){
my $userObject = WebGUI::User->new($self->session,$user->{userId});
if ($self->get('overridePublicProfile') || $userObject->profileIsViewable($userObject)){
if ($self->get('overridePublicProfile') || $userObject->profileIsViewable()) {
my (@profileFieldValues);
my %userProperties;
foreach my $profileField (@profileFields){