Forums

Sharing users between 2 blogs (6 posts)

  1. dbUNIT16
    Member
    Posted 3 years ago #

    Is there a way to share users between two blogs on the same server? I have one in the root directory, and one plan to install one in another folder, let's say /shop

    This will contain products from Amazon.com and other affiliate programs. I'd like to link the users so that users who are already registered can comment on products.

    Any solutions for this?

    Thanks,

    Jon

  2. tomatoma
    Member
    Posted 3 years ago #

    Theory:

    1) You install Blog B using the same database as blog A (changing the $table_prefix in config.php)
    http://codex.wordpress.org/Installing_Multiple_Blogs#Single_Database

    2) In blogB's wp-config.php you have to ad two lines:

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

    http://codex.wordpress.org/Editing_wp-config.php#Custom_User_and_Usermeta_Tables

    For me it's not working, when I try to login on Blog B, I just get a blank page with a message "You have no authorisation to access this pages"

    May be you are luckier than me

  3. singhrt
    Member
    Posted 3 years ago #

    I'm trying this as well but I'm getting the same "You have no authorisation to access this pages".

    Does anyone have a sollution for this?

  4. singhrt
    Member
    Posted 3 years ago #

    IVE DONE IT!!

    For me just put in

    define('CUSTOM_USER_TABLE', $table_prefix.'my_users');

    into the wp-config file. The error message stopped by not including the following:

    define('CUSTOM_USER_META_TABLE', $table_prefix.'my_usermeta');

    obviously changing my_ to your table name.

  5. philpeter
    Member
    Posted 2 years ago #

    This doesn't work for me either, I get the following error:

    You do not have sufficient permissions to access this page.

    singhrt's solution didn't work either (though I'm not surprised because that surely just sets to the second user table rather than the 'master'.

    Any ideas anyone?

  6. philpeter
    Member
    Posted 2 years ago #

    Has anybody else tried this yet? All the intructions seem easy enough, maybe too easy... has something been missed do you think?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.