I’m afraid that I forgot the name of whomever requested this plugin for WordPress. It was a nice little chat in IM, and at one point, this person said they would love to see a simple way to automatically register avatar names on WordPress blogs, by having them touching an in-world object. My apologies for forgetting your name, or I’d be giving you full credit for the idea.
Since I’m so keen in integrating Second Life with whatever I find useful, this seemed like a simple thing to do. Like everything WordPress-wise, there are always roadblocks to stumble when one’s a beginning plugin developer (wow… that sounds ominous!), so, of course, it took me far more time than I expected…
The plugin can be found on WordPress’ official plugin repository, and it has the very stupid name of “SL User Create”, because I was not feeling inspired. I now regret the decision; I should get another name. It’s easy to use and install: after activating the plugin, it will show you an admin page where a LSL script is displayed. Just copy & paste it into a prim. Now everybody (including yourself!!) who touches that prim will get registered to your WordPress site with their avatar name, and get the password by IM. Very simple! And you can have multiple registration objects.
Unfortunately, some nasty bugs have crept in, and apparently, under some circumstances, the same avatar will be able to register multiple times (which is not supposed to be possible… but sometimes it happens!). There are also some security issues to consider — I will probably need to add some checking to allow registrations only from “approved” registration objects, and add “blacklists” for some avatars. There is some very simple hook that will invalidate selected objects by forcing them to self-delete their scripts (to prevent them from registering again). So on the security side there is still something to be done.
It might also be fun to extract some data from my.secondlife.com and add it to the WordPress user profile as well, by adding a few meta keys. Beyond that, there is little else to do, unless someone suddenly finds a wonderful new use for this plugin which I hadn’t considered, and has a few suggestions for improvement. I’d be glad to accomodate those ideas! On the other hand, remember that an avatar-registered user is just a regular WordPress user, so they log in normally with their newly created account, and all functionality that exists for regular users will be present. The advantage of this method is that you can close your WordPress site to new registrations except the ones coming from Second Life, thus guaranteeing that you only have registered SL users as WordPress users.
I’m thus looking for beta testers. If you have a convenient site where you wish to install this plugin, please give it a try. I haven’t done any tests on OpenSim to see if it works on OS-based grids as well. In theory, it should work on any grid that has at least llHTTPRequest() active for outgoing calls.
Again, a fair word of warning: this is still a very beta release, and there are serious security problems to fix first. Don’t run it on any site where you are not absolutely safe in having registered users. On the other hand, if you’re developing one WordPress site for the SL community, and wish to start testing some integration with it, this is the right moment to do so.
Integration, in my mind, is the way to go. Linden Lab is very reluctant in providing more third-party integration — they have an internal OpenID system running, they have lots of internal APIs to extract information from avatars, regions and sims, and so forth — but few are open to the public. At least we have LSL and two-way Web communication. With that, some avenues for integration can be opened. This is just another one, and I have a third one under development, which hopefully I can announce next week.
In the mean time, enjoy 🙂
[UPDATE] The latest version includes a lot of new security features (they’re not perfect but far better than using nothing at all) and is also OpenSim compatible (for 0.7.0.2 and above)