Whoever decided to name the plugin for External database "db" just cost me about 3 days of my life [rant/FYI post]

Whoever decided to name the plugin for External database "db" just cost me about 3 days of my life [rant/FYI post]

by Eric Taylor -
Number of replies: 1

Just FYI folks, if you're trying to adapt the External Database plugin, make sure you get ALL instances of the word db when you're changing your plugin name. It is the most terrible thing in the world the original coder could possibly name a plugin, because it conflicts WILDLY with the innumerable instances of the generic term db that are also used in the code, and thus makes it super confusing to try and use the external db plugin as a starting point for a new auth plugin, despite it being a fairly simple one that looks tempting to try.

At any rate, I finally got everything running when I realized that I had missed one "db" as in the plugin name not "db" as in the generic abbreviation for database. This was the last thing in the settings.php file, resulting in not having any "field_map_" entries associated with my plugin, but rather they were still being saved to the External Database plugin.

//     Display locking / mapping of profile fields.
$authplugin = get_auth_plugin('db'); // <----- Change this freaking line to match the name of your plugin

Sorry for the rant, just had to get that off my chest! (And hopefully it is useful for anyone else trying to write auth plugins.)

Average of ratings: Useful (4)