I’m trying out the SharDB plugin, but it doesn’t seem to be respecting my CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE declarations — it is querying $shardb_prefix.users
instead of my custom table name. Anyone know if this plugin is supposed to support the CUSTOM_USER_TABLE definitions?
Thanks!
Ok, looking into this, I found a little bug in the tables function (beginning on line 1088) in the db.php script file that comes with SharDB.
It was this bit of code that was the problem (starting on line 1114 of db.php):
See, it does check before it returns the tables list to see if CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE are defined, and overwrites the default values if they are. However the check was not running in the first place because of the
isset( $tables['users'] )
check on line 114. $tables is an array of table names, ‘users’ is one of the values in the array, so $tables[‘users’] is never set.So change line 114 to:
and voila. You’re all set
(I’m gonna go find the plugin author now and report the bug!)