]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/CGI.pm
(no commit message)
[git.ikiwiki.info.git] / IkiWiki / CGI.pm
index 89f4f2d732715aa3465ca9b7d181409c469e6d75..1db96f9f284ac24ee395224484517a6d264270ad 100644 (file)
@@ -294,8 +294,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");
                }