summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-26 14:02:36 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-26 14:02:36 -0400
commitc2507d33cb684f62c29b8ec41a8a2aedf02a7302 (patch)
tree9f107ef66b653cfd38ff751fbeafcc87a99525bf /IkiWiki/Plugin
parentae8318b3cb447f400810c3fe8a8021720b965233 (diff)
allow account_creation_password to not be defined
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/passwordauth.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm
index a3fd2d4ed..e0e8e51df 100644
--- a/IkiWiki/Plugin/passwordauth.pm
+++ b/IkiWiki/Plugin/passwordauth.pm
@@ -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",