]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/passwordauth.pm
response
[git.ikiwiki.info.git] / IkiWiki / Plugin / passwordauth.pm
index 7ffc12080cdc6135dc64600f279135a7f7c1deb4..131b3a43e16f2d935067a10dbe3a7aa8b76ea09e 100644 (file)
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::passwordauth;
 
 use warnings;
 use strict;
-use IkiWiki;
+use IkiWiki 2.00;
 
 sub import { #{{{
         hook(type => "formbuilder_setup", id => "passwordauth",
@@ -21,7 +21,7 @@ sub formbuilder_setup (@) { #{{{
        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") {
@@ -187,7 +187,8 @@ sub formbuilder (@) { #{{{
                        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");
                                }
                        }
                }