- Fixed a problem where profile data would be mixed between the current user
and the user your viewing the profile of.
This commit is contained in:
parent
6944fe3316
commit
a16b470dd4
5 changed files with 13 additions and 11 deletions
|
|
@ -106,7 +106,7 @@ sub delete {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 formField ( [ formProperties, withWrapper] )
|
||||
=head2 formField ( [ formProperties, withWrapper, userObject ] )
|
||||
|
||||
Returns an HTMLified form field element.
|
||||
|
||||
|
|
@ -118,6 +118,10 @@ Optionally pass in a list of properties to override the default properties of an
|
|||
|
||||
An integer indicating whether to return just the field's form input, or the field with a table label wrapper (1), or just the field value (2).
|
||||
|
||||
=head3 userObject
|
||||
|
||||
A WebGUI::User object reference to use instead of the currently logged in user.
|
||||
|
||||
=cut
|
||||
|
||||
sub formField {
|
||||
|
|
@ -137,7 +141,9 @@ sub formField {
|
|||
my $default;
|
||||
if ($session{form}{$properties->{name}}) {
|
||||
$default = $session{form}{$properties->{name}};
|
||||
} elsif ($session{user}{$properties->{name}}) {
|
||||
} elsif (defined $u && $u->profileField($properties->{name})) {
|
||||
$default = $u->profileField($properties->{name});
|
||||
} elsif (!defined $u && $session{user}{$properties->{name}}) {
|
||||
$default = $session{user}{$properties->{name}};
|
||||
} else {
|
||||
$default = WebGUI::Operation::Shared::secureEval($properties->{dataDefault});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue