]> sipb.mit.edu Git - ikiwiki.git/commitdiff
allow account_creation_password to not be defined
authorJoey Hess <joey@kodama.kitenet.net>
Sat, 26 Jul 2008 18:02:36 +0000 (14:02 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sat, 26 Jul 2008 18:02:36 +0000 (14:02 -0400)
IkiWiki/Plugin/passwordauth.pm

index a3fd2d4ede3ce5e446b68dba28b13f7f4965471e..e0e8e51df2141feff7fa1285e843e881cac55684 100644 (file)
@@ -105,7 +105,9 @@ sub formbuilder_setup (@) { #{{{
                
                if ($form->submitted eq "Register" || $form->submitted eq "Create Account") {
                        $form->field(name => "confirm_password", type => "password");
-                       $form->field(name => "account_creation_password", type => "password") if (length $config{account_creation_password});
+                       $form->field(name => "account_creation_password", type => "password")
+                                if (defined $config{account_creation_password} &&
+                                    length $config{account_creation_password});
                        $form->field(name => "email", size => 50);
                        $form->title("register");
                        $form->text("");
@@ -142,7 +144,8 @@ sub formbuilder_setup (@) { #{{{
                                                shift eq $config{account_creation_password};
                                        },
                                        required => 1,
-                               ) if (length $config{account_creation_password});
+                               ) if (defined $config{account_creation_password} &&
+                                     length $config{account_creation_password});
                                $form->field(
                                        name => "email",
                                        validate => "EMAIL",