Allow profile fields to be emptied. Fixes bug #10913.

This commit is contained in:
Colin Kuskie 2009-09-14 20:42:38 -07:00
parent b57dff3e3e
commit 5ee64a57d3
2 changed files with 2 additions and 1 deletions

View file

@ -432,8 +432,8 @@ sub www_editSave {
unless(scalar(@{$retHash->{errors}})) {
my $profile = $retHash->{profile};
my $privacy = {};
$session->user->update($profile);
foreach my $fieldName (keys %{$profile}) {
$session->user->profileField($fieldName,$profile->{$fieldName});
my $privacySetting = $session->form->get("privacy_".$fieldName);
next unless $privacySetting;
$privacy->{$fieldName} = $privacySetting;