Apr 29 2007

First (and prolly only) version of external db authentication plugin for WP

Category: UncategorizedCharlene @ 11:45 am

Title mostly says it all. I needed to make a plugin for Bonnie’s site to use a decent blog (Moodle’s blog system just isn’t cutting it) plus using data from already-registered users. You essentially set up a limited access account to your external db and enter the details into this plugin’s options. There’s also an option to give a custom error message in case of invalid login/pw combinations - in our case it will inform the user that they need to create an account first at the moodle site then come back to login.

We’re planning to combine this with a default user role of author/editor-ish (author with category management permissions, preferably) so that we get the same general functionality of Moodle’s blogs plus comments, better management, RSS, etc. This is my first plugin and I tried to follow general layout conventions of wordpress - hope it works for others, too.

It’s hosted on Wordpress under External Database Authentication. About the only update I may think of doing is somehow disabling users from changing passwords and user info in wordpress, as it will be overwritten by the moodle data anyway…

Tags: ,

2 Responses to “First (and prolly only) version of external db authentication plugin for WP”

  1. James White says:

    Does the database plugin work with SQL Server 2000? The documentation I read says it was designed with the Moodle database in mind, but I want to get a since of how hard configuring this tool to work with SQL Server will be. Any guidance/directions you could provide would be greatly appreciated.

    Thanks,

    James White

  2. owner supremo says:

    James,

    While it’s with Moodle in mind, those are sort of extended database fields it looks at for further populating of wordpress user fields and it should work with any general mysql database for which you know connection settings and field names for username and password. I’m a bit more vague on whether it would work with SQL server out of the box, firstly because I haven’t tried it, and secondly because I do use mysql-specific commands (mysql_query, mysql_result, etc.) in the code rather than ADOdb.

    The actual SQL statements probably would work regardless of whether it’s mySQL or SQL server…it’s a matter of functions, not queries.

    I may look into making it more db-agnostic eventually, but right now it’s a bit crazy time-wise, so it wouldn’t be for a bit.

Leave a Reply