From 5ee64a57d38707dfd3e893376b4aec53228f93b2 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 14 Sep 2009 20:42:38 -0700 Subject: [PATCH] Allow profile fields to be emptied. Fixes bug #10913. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Account/Profile.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index a373dc97a..0236d02c8 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -35,6 +35,7 @@ - fixed #10955: Story Manager: unable to import packages - fixed #10970: Newsletter Asset: no subscribe link - fixed #10953: SendNewsletters Activity: Invalid template variable + - fixed #10913: User profiles: Impossible to delete field contents 7.7.19 - fixed #10838: Forwarded forum post email to new CS adds reply to original thread diff --git a/lib/WebGUI/Account/Profile.pm b/lib/WebGUI/Account/Profile.pm index 60bc7bad8..e5ff26d19 100644 --- a/lib/WebGUI/Account/Profile.pm +++ b/lib/WebGUI/Account/Profile.pm @@ -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;