Universal Login for 13 Blogs
-
Hello everyone,
I need some guidance in linking user privileges for 13 blogs located in all these sub-domains.
——————–
ab.jobortunity.ca
bc.jobortunity.ca
mb.jobortunity.ca
nb.jobortunity.ca
nl.jobortunity.ca
ns.jobortunity.ca
nt.jobortunity.ca
nu.jobortunity.ca
on.jobortunity.ca
pe.jobortunity.ca
qc.jobortunity.ca
sk.jobortunity.ca
yt.jobortunity.ca
——————–What has been done so thus far?
1. I have installed WordPress 3.2.1 to allsub-domains, with individual prefix for every single one on of them into one database.
2. I wanted all users to share one _users table and one _usermeta table, to have universal login and registration privileges across all these sub-domains.
So, I saved and modified my first blogs _users, _usermeta tables from the database to my computer in a sql format. I then renamed the tables as universal_users and universal_usermeta, the same was done inside these user tables. Saved and uploaded back onto the same database.
3. After all that was done, the following took place, I have added the following code to all the wp-config.php files.
define('CUSTOM_USER_TABLE', 'universal_users'); define('CUSTOM_USER_META_TABLE', 'universal_usermeta');
Went back to the website, and performed a test. I encountered the error: ‘You do not have sufficient permissions to access this page.‘.
So, I went back to the wp-config.php file, and changed the code to use the original _usermeta of each blog, but left the universal_ prefix for users. Went back to test, and it worked. I could use one admin username accross all 13 blogs, so I desided to add a new user named “testuser” and see If I can post on all blogs, and for sure it worked like a charm.
4. I noticed one problem, when inside dashboard as “testuser” the extra details for the profile did now follow, such as firs name, last name, etc. Because the _usermeta was not universal.
So then I went back on Google to do more research, since now I need one _usermeta file across all the blogs, but without the error for the login. So I went back to research on Google, and came accross this page: https://www.ads-software.com/support/topic/how-to-use-2-blogs-with-the-same-users?replies=17
5. After reading the whole article, I resided this is what needs to be done, and to give it a try.. Uploaded the wp-settings.php file onto my machine, and looked for:
$wpdb->users = $wpdb->prefix . 'users';
and
$wpdb->usermeta = $wpdb->prefix . 'usermeta';
but they are no where to be found.. so what now? I’m confused, did these change in the 3.2.1 version?
I checked the capabilities.php file, and the code I need to change is there:
$this->cap_key = $wpdb->prefix . 'capabilities';
Any help would be greatly appreciated. Or if this has been covered before for the new version of wp, and could possibly point me in the right direction. Thank you in advance, and sorry for the long read.
- The topic ‘Universal Login for 13 Blogs’ is closed to new replies.