X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9026ae05c2e7b26c0021e9ecf6dcff64a1dc0ca9..ffae58a97865d24796826f4b4ff9da82aef93116:/IkiWiki/Plugin/passwordauth.pm diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm index a2e774c36..1520cea83 100644 --- a/IkiWiki/Plugin/passwordauth.pm +++ b/IkiWiki/Plugin/passwordauth.pm @@ -26,6 +26,7 @@ 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 => "email", size => 50); $form->title("register"); $form->text(""); @@ -51,6 +52,13 @@ sub formbuilder_setup (@) { #{{{ shift eq $form->field("password"); }, ); + $form->field( + name => "account_creation_password", + validate => sub { + shift eq $config{account_creation_password}; + }, + required => 1, + ) if (length $config{account_creation_password}); $form->field( name => "email", validate => "EMAIL",