X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/bcfba8cdb50dcaca9faa182955825670efb15852..b24da2c9fa0c675f97b16773f3d366a78e9e94b8:/IkiWiki/CGI.pm diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index b6923b54f..878869ef1 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -277,8 +277,9 @@ sub cgi_prefs ($$) { return; } elsif ($form->submitted eq 'Save Preferences' && $form->validate) { - if (defined $form->field('email')) { - userinfo_set($user_name, 'email', $form->field('email')) || + my $email = $form->field('email'); + if (defined $email) { + userinfo_set($user_name, 'email', $email) || error("failed to set email"); }