=== Plugin Name === Contributors: charlener Donate link: none Tags: authentication, login, database, MSSQL, MySQL, PostgreSQL Requires at least: 2.5 Tested up to: 2.6 Stable tag: 3.0 A plugin that allows the use of an external database (MySQL, PostgreSQL, or MSSQL) for authentication into wordpress. == Description == A plugin that allows the use of an external MySQL, PostgreSQL, or MSSQL database for authentication into wordpress. It requires you know the encryption method for the passwords stored in the external database and allows you to use MD5, SHA1, plaintext, or enter the hash/salt method yourself. If you want to connect to a PostgreSQL or MSSQL database, you will need to install the MDB2 PEAR database abstraction package and relevant database drivers. MySQL continues to use the built-in PHP functions. Version 1.0 works with the 2.0-2.1 WordPress series for sure; other versions unsure. Version 2.0 works with 2.5 upwards. This plugin is particularly useful if you want users to login to do groupblogging, but want some control over who can login due to previous records. To do this, you'll also need to change new user default role in Settings->General to something other than merely a subscriber. I have tested the PostgreSQL connection, but don't have access to MSSQL servers; it uses the same code, though, so presumably it will work. == Installation == 1. Upload `ext_db_auth.php` to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress 1. Enter your external database settings in Options->External DB settings == Frequently Asked Questions == = Why external? = Because Moodle seems to have issues with having blogs actually have commenting abilities. = What about the error message? Why doesn't it show up all the time? = It seems that the updated version of the hook authenticates, but will override (sort of) actions if the login in the wp user database authenticates successfully. This means that synchronizing will not occur, as it jumps to the admin pages before updating the password from the external db. The current workaround for this is doing a redirect then exit() so that it won't go through unless the password really is the "right" (matches the external db) one. This also means that the error message doesn't pop up. If the login attempt is with a username that WordPress has never "seen" (never added to wp_user) then the error message shows up. = Can I still create accounts within WordPress? = Yes, but if there is a situation where you have a pre-created account on WordPress, then add an account with the identical username on the external database, the WordPress data will be overwritten. Best practice is to not really use the user admin interface on WordPress for account addition. = Can I update user information within WordPress? = Yes, and your individual users can do so, too. However, if additional data fields that match WP's additional data fields are set in the plugin configuration, it will overwwrite WordPress user information every time. = My external database's passwords are hashed with a salt/datestamp/phases of the moon/etc = Choose "Other" as your encoding method, then enter the method you use in the "Other" textbox as PHP code. = I'm locked out! = Delete or rename the plugin; if it's a DB connection-related error most likely you have the wrong connection, etc. information for the external database. == Screenshots == 1. Plugin config screen 2. Example login error message