use warnings;
use strict;
-use IkiWiki;
+use IkiWiki 2.00;
sub import { #{{{
hook(type => "formbuilder_setup", id => "passwordauth",
my $cgi=$params{cgi};
if ($form->title eq "signin" || $form->title eq "register") {
- $form->field(name => "name", required => 0, size => 30);
+ $form->field(name => "name", required => 0, size => 50);
$form->field(name => "password", type => "password", required => 0);
if ($form->submitted eq "Register" || $form->submitted eq "Create Account") {
my $user_name=$form->field('name');
foreach my $field (qw(password)) {
if (defined $form->field($field) && length $form->field($field)) {
- userinfo_set($user_name, $field, $form->field($field)) || error("failed to set $field");
+ IkiWiki::userinfo_set($user_name, $field, $form->field($field)) ||
+ error("failed to set $field");
}
}
}