fixed UserList
This commit is contained in:
parent
51c133fa1e
commit
e085eff6af
7 changed files with 30 additions and 33 deletions
|
|
@ -14,6 +14,7 @@
|
|||
- fixed #9112: Thingy View Thing screen doesn't preserve newlines
|
||||
- fixed #9155: purpose of "headblock" duplicates "extra head tags"
|
||||
- fixed: Improve Thingy navigation.
|
||||
- fixed #9126: UserList is completely broken in 7.6.4 (Yung Han Khoe)
|
||||
|
||||
7.6.4
|
||||
- Survey now will show progress and time limit.
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -434,7 +434,7 @@ 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, userProfileData.publicEmail ";
|
||||
$sql = "select distinct users.userId, users.userName, userProfileData.publicProfile ";
|
||||
# Include remaining profile fields in the query
|
||||
foreach my $profileField (@profileFields){
|
||||
$sql .= ", userProfileData.$profileField->{fieldName}";
|
||||
|
|
@ -534,26 +534,17 @@ sub view {
|
|||
$p->setDataByArrayRef(\@visibleUsers);
|
||||
my $users = $p->getPageData($paginatePage);
|
||||
foreach my $user (@$users){
|
||||
if ($self->get('overridePublicProfile') || $user->{publicProfile} eq "1" || ($user->{publicProfile} eq "" && $defaultPublicProfile eq "1")){
|
||||
my $userObject = WebGUI::User->new($self->session,$user->{userId});
|
||||
if ($self->get('overridePublicProfile') || $userObject->profileIsViewable($userObject)){
|
||||
my (@profileFieldValues);
|
||||
my %userProperties;
|
||||
my $emailNotPublic;
|
||||
if ($user->{publicEmail} eq "0" || ($user->{publicEmail} eq "" && $defaultPublicEmail ne "1")){
|
||||
unless ($self->get('overridePublicEmail')){
|
||||
$emailNotPublic = 1;
|
||||
}
|
||||
}
|
||||
foreach my $profileField (@profileFields){
|
||||
if ($profileField->{fieldName} eq "email" && $emailNotPublic){
|
||||
push (@profileFieldValues, {
|
||||
"profile_emailNotPublic"=>1,
|
||||
});
|
||||
}
|
||||
else {
|
||||
# Assign field name
|
||||
my $profileFieldName = $profileField->{fieldName};
|
||||
$profileFieldName =~ s/ /_/g;
|
||||
$profileFieldName =~ s/\./_/g;
|
||||
# Assign field name
|
||||
my $profileFieldName = $profileField->{fieldName};
|
||||
$profileFieldName =~ s/ /_/g;
|
||||
$profileFieldName =~ s/\./_/g;
|
||||
|
||||
if ($userObject->canViewField($profileField->{fieldName},$self->session->user)){
|
||||
# Assign value
|
||||
my $value = $user->{$profileField->{fieldName}};
|
||||
# Assign default value if not available
|
||||
|
|
@ -577,8 +568,13 @@ sub view {
|
|||
$userProperties{'user_profile_'.$profileFieldName.'_value'} = $value;
|
||||
}
|
||||
}
|
||||
else{
|
||||
push (@profileFieldValues, {
|
||||
"profile_notPublic"=>1,
|
||||
});
|
||||
$userProperties{'user_profile_'.$profileFieldName.'_notPublic'} = 1;
|
||||
}
|
||||
}
|
||||
$userProperties{"user_profile_emailNotPublic"} = $emailNotPublic;
|
||||
$userProperties{"user_id"} = $user->{userId};
|
||||
$userProperties{"user_name"} = $user->{userName};
|
||||
$userProperties{"user_profile_loop"} = \@profileFieldValues;
|
||||
|
|
|
|||
|
|
@ -54,11 +54,11 @@ our $HELP = {
|
|||
{ 'name' => 'user_name' },
|
||||
{ 'name' => 'user_id' },
|
||||
{ 'name' => 'user_profile_PROFILEFIELDNAME_value' },
|
||||
{ 'name' => 'user_profile_PROFILEFIELDNAME_notPublic' },
|
||||
{ 'name' => 'user_profile_PROFILEFIELDNAME_file' },
|
||||
{ 'name' => 'user_profile_emailNotPublic' },
|
||||
{ 'name' => 'user_profile_loop',
|
||||
'variables' => [
|
||||
{ 'name' => 'profile_emailNotPublic' },
|
||||
{ 'name' => 'profile_notPublic' },
|
||||
{ 'name' => 'profile_value' },
|
||||
{ 'name' => 'profile_file' },
|
||||
],
|
||||
|
|
|
|||
|
|
@ -165,9 +165,9 @@ User List.|,
|
|||
lastUpdated => 1081514049
|
||||
},
|
||||
|
||||
'Email not public message' => {
|
||||
message => q|Email not public|,
|
||||
lastUpdated => 1081514049
|
||||
'Field not public message' => {
|
||||
message => q|Field not public|,
|
||||
lastUpdated => 1228125347
|
||||
},
|
||||
|
||||
'id label' => {
|
||||
|
|
@ -329,6 +329,12 @@ be searched or not. This will only have an effect if the limitSearch tmpl_var is
|
|||
lastUpdated => 1081514049
|
||||
},
|
||||
|
||||
'user_profile_PROFILEFIELDNAME_notPublic' => {
|
||||
message => q|A conditional which is true if the profile field with the name PROFILEFIELDNAME is not
|
||||
public, example <tmpl_var user_profile_firstName_notPublic>|,
|
||||
lastUpdated => 1228125347
|
||||
},
|
||||
|
||||
'user_profile_PROFILEFIELDNAME_value' => {
|
||||
message => q|The value of the profile field with the name PROFILEFIELDNAME in the users user
|
||||
profile. Example <tmpl_var user_profile_firstName_value>|,
|
||||
|
|
@ -342,20 +348,14 @@ an image.|,
|
|||
lastUpdated => 1081514049
|
||||
},
|
||||
|
||||
'user_profile_emailNotPublic' => {
|
||||
message => q|A conditional that is true if the users email address is not public.|,
|
||||
lastUpdated => 1081514049
|
||||
},
|
||||
|
||||
'user_profile_loop' => {
|
||||
message => q|A loop containing the users profile fields.|,
|
||||
lastUpdated => 1081514049
|
||||
},
|
||||
|
||||
'profile_emailNotPublic' => {
|
||||
message => q|A conditional that is true if the users email address is not public. It will only be
|
||||
true for the 'email' profile field.|,
|
||||
lastUpdated => 1081514049
|
||||
'profile_notPublic' => {
|
||||
message => q|A conditional that is true for each field that is not public.|,
|
||||
lastUpdated => 1228125347
|
||||
},
|
||||
|
||||
'profile_value' => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue