Unobtrusive wpopenid

I’ve been meaning to install Alan Castonguay’s wpopenid wordpress plugin to enable OpenID authenticated comments for some time now. I finally got around to it tonight, and was overall pleased with it, despite a few minor bugs. More importantly though, I later ran across Sam Ruby’s post entitled “Unobtrusive OpenID” in which he talks about using a comment form’s already-existing website field to get OpenIDs. This made a whole lot of sense to me, and I am happy to report that I was able to modify wpopenid to mimic this functionality without too much effort. So the resulting plugin now has an administrative option to enable “Unobtrusive Mode”. When this is turned on, the URL typed into the website field will be checked to see if it is a valid OpenID. If it is, the name and email address provided will be ignored and login will continue as normal with the OpenID. If the URL provided is not a valid OpenID, then it will be treated as a normal comment, subject to your existing requirements for presence of name and email. When “Unobtrusive Mode” is disabled, the plugin functions exactly as it always has. Feel free to post test comments on this post to make sure it is working.

This patch also includes two additional fixes:

  • debug mode is now off by default. You all might want to look at your /wp-content/uploads/php.log file… I’ve noticed at least one person with one in excess of 500 MB large!
  • fixed problem where OpenID would create an invalid return_to URL if your wordpress URL is different than the blog URL

Download the plugin from the project page.

Comments and responses

Have you written a response to this? Let me know the URL:

you silly people with your silly i-names :-) anyway, it works now. However, I also need to fix it so that if your OpenID provider doesn't support sreg, then it will use the name and email from the comment form. Once that is fixed, I'll upload a new patch. Thanks for catching that. I deleted your account from wordpress, so try logging in again and see if it works correctly.

Hmm, I'm honestly not sure. I'm running 2.1, and I haven't tested it on anything else. In trying to address the name/email issue I mentioned in my last comment, I found a larger problem with the way wpopenid interacts with other plugins that filter comments. I'm going to be working on that, and I'll look at version compatibility as well.

I did manage to email Alan (I was using .com instead of .net, doh!), but I haven't heard back from him yet. This is turning out to be some pretty major changes, so I'd like to see them committed upstream, if possible. Otherwise, I might have to make this an unofficial fork.

If moderation is fully enabled, will OpenID users see their comment as pending? With Alan's version you see nothing...
Right now, it still behaves the same way as Alan's version. I wasn't aware of this "bug" until this last weekend when someone else mentioned it, as I don't normally moderate posts. I'll certainly add that to the list of feature requests though.