Multiple Single Installs of WordPress with a central user base

Im sorry that I am asking this but I have been searching for ages and for some reaseon the suggested custom user table dosn’t work, it just gives me a username error.

This is the code I am taking about:

Read More
define('CUSTOM_USER_TABLE','new_user_table');
define('CUSTOM_USER_META_TABLE', 'new_usermeta_table');

So I have a main Single install of WordPress, Lets say I have another on a subdomain (Subdomain A) and a different WordPress site which IS a Sub Directory MU Install on Sub Domain B. I only want people to create an account at the top, main site however they can log in on any of the domains. I would use MU but one of the sub sites is using MU so I cant. Single Sign on is not important but if possible then that would also be really good.

Any Ideas would be appreciated!

Cheers,
Joe

Related posts

Leave a Reply

2 comments

  1. When you create a new user in such a shared user table, the roles and capabilities are set for one site only. The name and the ID will be available on all sites, but without any privileges the user cannot do anything useful.

    You have to hook into 'user_register' and copy the roles and related data for all sites with custom code. You get the new user ID as a parameter.

  2. OK Guys. There is a way to do this without editing the core files!

    1) Open up your WP-config.php file and add to the file the following code. This will change where WordPress gets it’s users from.

    define('CUSTOM_USER_TABLE','wp_users');
    define('CUSTOM_USER_META_TABLE', 'wp_usermeta');
    

    Remember to replace the wp_ prefix with the prefix of your main site.

    2) So no download and install the WordPress Plugin WP-Orphanage Extended (http://wordpress.org/extend/plugins/wp-orphanage-extended/). This will allow you to sync the user privileges across all of the sites.

    3) Go to Settings > WP-Orphanage Extended and set the default role (Subscriber is probably the best choice. Now add two prefix’s, one being the original/master sites prefix and the other being the sub sites prefix.

    That is all there is to it now. Sorry for the inconvenience with the previous way of editing core files. Non of that is needed now.