use strict;
use IkiWiki 2.00;
-sub import { #{{{
+sub import {
hook(type => "getsetup", id => "passwordauth", "call" => \&getsetup);
hook(type => "formbuilder_setup", id => "passwordauth", call => \&formbuilder_setup);
hook(type => "formbuilder", id => "passwordauth", call => \&formbuilder);
hook(type => "sessioncgi", id => "passwordauth", call => \&sessioncgi);
-} # }}}
+}
-sub getsetup () { #{{{
+sub getsetup () {
return
plugin => {
safe => 1,
safe => 1,
rebuild => 0,
},
-} #}}}
+}
# Checks if a string matches a user's password, and returns true or false.
-sub checkpassword ($$;$) { #{{{
+sub checkpassword ($$;$) {
my $user=shift;
my $password=shift;
my $field=shift || "password";
}
return $ret;
-} #}}}
+}
-sub setpassword ($$;$) { #{{{
+sub setpassword ($$;$) {
my $user=shift;
my $password=shift;
my $field=shift || "password";
else {
IkiWiki::userinfo_set($user, $field, $password);
}
-} #}}}
+}
-sub formbuilder_setup (@) { #{{{
+sub formbuilder_setup (@) {
my %params=@_;
my $form=$params{form};
}
}
-sub formbuilder (@) { #{{{
+sub formbuilder (@) {
my %params=@_;
my $form=$params{form};
}
}
}
-} #}}}
+}
-sub sessioncgi ($$) { #{{{
+sub sessioncgi ($$) {
my $q=shift;
my $session=shift;
IkiWiki::cgi_prefs($q, $session);
exit;
}
-} #}}}
+}
1