WordPress.org

Forums

Staying logged in across multiple Blogs (4 posts)

  1. iclausen
    Member
    Posted 7 years ago #

    I am currently running a site with 7 blog (7 WP installs on the same database) using the solution at:

    http://www.moonbatty.com/blog/2006/05/16/one-user-database-2-blogs/

    I use one of the blogs as the master and all others are slaves (ie. user roles across all blogs are set to wp_user_roles in all applicable database tables)

    I have edited the capabilites.php in the following way:

    $this->role_key = $table_prefix . ‘user_roles’;
    became
    $this->role_key = ‘wp_user_roles’;

    and
    $this->cap_key = $table_prefix . ‘capabilities’;
    became
    $this->cap_key = ‘wp_capabilities’;

    3- I edited wp-settings.php and made the following 2 changes:
    $wpdb->users = $table_prefix . ‘users’;
    became
    $wpdb->users = ‘wp_users’;

    and

    $wpdb->usermeta = $table_prefix . ‘usermeta’;
    became
    $wpdb->usermeta = ‘wp_usermeta’;

    Currently it is possible or a user to log in to any of the blogs with the same credetials and have the same role in each blog. I problem is that when they switch from blog to blog their login does not transfer. (i.e. they have to login to comment on each blog instead of logging in once and haveing the ability to comment anywhere on the site.)

    I'm 99% sure that this has something to so with the way cookies are handled, but I can't quite figure it out. Any help/advice would be much appreciated.

    Cheers-
    Ian

  2. h4x3d
    Member
    Posted 7 years ago #

    just an idea and I am not sure if you checked already,
    but does it set two cookies or one universal cookie?

  3. BoInG
    Member
    Posted 7 years ago #

    i'm interested finding solutions for the same problem.

    can i set 1 cookie for multiple blogs for the same domain address?

  4. talker
    Member
    Posted 7 years ago #

    Little by slow little, am finfing tidbits, that may get me to where I can actually understand and use the information.

Topic Closed

This topic has been closed to new replies.

About this Topic