]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/openid.pm
Merge branch 'ready/html5'
[git.ikiwiki.info.git] / IkiWiki / Plugin / openid.pm
index d369e30c995277f8a5e7f5bccdd5cd17dbcea0aa..107c6adcbb1e58e07d4e2a76a0845c14fb45fd5b 100644 (file)
@@ -104,7 +104,6 @@ sub formbuilder_setup (@) {
                        size => 1, force => 1,
                        fieldset => "login",
                        comment => $session->param("name"));
-               $form->field(name => "email", type => "hidden");
        }
 }
 
@@ -119,7 +118,9 @@ sub validate ($$$;$) {
        my $claimed_identity = $csr->claimed_identity($openid_url);
        if (! $claimed_identity) {
                if ($errhandler) {
-                       $errhandler->($csr->err);
+                       if (ref($errhandler) eq 'CODE') {
+                               $errhandler->($csr->err);
+                       }
                        return 0;
                }
                else {
@@ -223,7 +224,7 @@ sub auth ($$) {
        }
        elsif (defined $q->param('openid_identifier')) {
                # myopenid.com affiliate support
-               validate($q, $session, $q->param('openid_identifier'));
+               validate($q, $session, scalar $q->param('openid_identifier'));
        }
 }
 
@@ -238,7 +239,7 @@ sub getobj ($$) {
        my $ua;
        eval q{use LWPx::ParanoidAgent};
        if (! $@) {
-               $ua=LWPx::ParanoidAgent->new;
+               $ua=LWPx::ParanoidAgent->new(agent => $config{useragent});
        }
        else {
                $ua=useragent();