]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/openid.pm
clarify
[git.ikiwiki.info.git] / IkiWiki / Plugin / openid.pm
index dc0e0f48ee98e70313abce4d195092989e5537c6..bb99446b4db2138f82dcce277caa097bff9e5ca1 100644 (file)
@@ -26,6 +26,7 @@ sub getsetup () {
                plugin => {
                        safe => 1,
                        rebuild => 0,
                plugin => {
                        safe => 1,
                        rebuild => 0,
+                       section => "auth",
                },
                openidsignup => {
                        type => "string",
                },
                openidsignup => {
                        type => "string",
@@ -56,7 +57,7 @@ sub formbuilder_setup (@) {
                # OpenID fieldset.
                $form->fieldsets("OpenID");
 
                # OpenID fieldset.
                $form->fieldsets("OpenID");
 
-               $form->field(
+               $form->field(
                        name => "openid_url",
                        label => gettext("Log in with")." ".htmllink("", "", "ikiwiki/OpenID", noimageinline => 1),
                        fieldset => "OpenID",
                        name => "openid_url",
                        label => gettext("Log in with")." ".htmllink("", "", "ikiwiki/OpenID", noimageinline => 1),
                        fieldset => "OpenID",
@@ -82,13 +83,13 @@ sub formbuilder_setup (@) {
                        }
                }
        }
                        }
                }
        }
-       elsif ($form->title eq "preferences") {
-               if (! defined $form->field(name => "name")) {
-                       $form->field(name => "OpenID", disabled => 1,
-                               value => $session->param("name"), 
-                               size => 50, force => 1,
-                               fieldset => "login");
-               }
+       elsif ($form->title eq "preferences" &&
+              IkiWiki::openiduser($session->param("name"))) {
+               $form->field(name => "openid_url", disabled => 1,
+                       label => htmllink("", "", "ikiwiki/OpenID", noimageinline => 1),
+                       value => $session->param("name"), 
+                       size => 50, force => 1,
+                       fieldset => "login");
        }
 }
 
        }
 }