Skip to:
Content
Pages
Categories
Search
Top
Bottom

User Sync for multisite


  • m2sahin
    Participant

    @m2sahin

    Hello to everyone,

    My site is multisite. How do I synchronize cross-site user and user information? Now, I’m going to explain exactly what I want to do.

    #############################################################

    My site (multisite)

    example.com/
    example.com/sub1
    example.com/sub2

    I want to register on all subsites at the same time when registering from any subsite.

    example.com/sub2/register – username: m2sahin (I registered from here)

    -—-—-—-—-—-—-—-—-—-

    example.com/members/m2sahin (active)
    example.com/sub1/members/m2sahin (active)
    example.com/sub2/members/m2sahin (active)

    When I change user information on any site, I want that information changed on all sites. (Profile photo, cover photo, country, forum, hobbies, etc.)

    example.com/members/m2sahin (profile photo 1 , Ukraine)
    example.com/sub1/members/m2sahin (profile photo 1 , Ukraine)
    example.com/sub2/members/m2sahin (profile photo 1 , Ukraine)

    -—-—-—-—-—-—-—-—-—-

    example.com/sub1/members/m2sahin/settings (profile photo 3 , Greece) (updated)

    -—-—-—-—-—-—-—-—-—-

    example.com/members/m2sahin (profile photo 3 , Greece)
    example.com/sub1/members/m2sahin (profile photo 3 , Greece)
    example.com/sub2/members/m2sahin (profile photo 3 , Greece)

    How can I do that, is it possible ???

Viewing 5 replies - 1 through 5 (of 5 total)

  • shanebp
    Moderator

    @shanebp

    On networked installs ( mulitsite ) WP and BP use the same users for ALL the sites.
    So profile data for a user will be available to ALL the sites that user belongs to.
    So there is no need for synchronization.


    m2sahin
    Participant

    @m2sahin

    define( ‘BP_ENABLE_MULTIBLOG’, true ); this code is active.

    in fact I want to make a multilingual site with multisite. Each site has a separate forum, I want someone who is enrolled in the Greek site to see profile information on the English site, and use the English forum and other things.

    Now I’m going to tell you about two different situations and their problems.

    **********************

    #1- Network Active (BP_ENABLE_MULTIBLOG disable)

    in this situations, the profile page will only appear on the main site. So a user who registered to the Greek site can only edit their profile on the English site.

    example.com/members/m2sahin (Active)
    example.com/sub1/members/m2sahin ( 404 )
    example.com/sub2/members/m2sahin ( 404 )

    *****************************

    #2- BP_ENABLE_MULTIBLOG enable

    A user who registered in the Greek site and updated his profile information cannot see the profile information he has changed on the English site.

    example.com/sub2/register – username: m2sahin (I registered from here)

    ———-

    example.com/members/m2sahin (active) (no profile photos , no other information)
    example.com/sub1/members/m2sahin (active) (no profile photos , no other information)
    example.com/sub2/members/m2sahin (active) (no profile photos , no other information)

    -—-—-—-—-—-—-—-—-—-

    example.com/sub1/members/m2sahin/settings (profile photo 1 , Occupation: Lawyer) (updated)

    -—-—-—-—-—-—-—-—-

    example.com/members/m2sahin (no profile photos , no other information)
    example.com/sub1/members/m2sahin (profile photo 1 , Occupation: Lawyer)
    example.com/sub2/members/m2sahin (no profile photos , no other information)


    m2sahin
    Participant

    @m2sahin

    Please tell me you understand. I really need help with this. I’m thinking of opening a ticket.


    Bigue Nique
    Participant

    @biguenique

    I haven’t figured out for profile header image yet, but you will find solutions for centralizing avatar storage on MULTIBLOG-enabled BP networks here: https://buddypress.org/support/topic/multiblogmultisite-avatar-missing/

    Basically, if you want to use avatars from the main site, you can just add this to your wp-config.php:

    
    define( 'BP_AVATAR_UPLOAD_PATH', dirname(__FILE__).'/wp-content/uploads' );                         define( 'BP_AVATAR_URL', '//'.$_SERVER['HTTP_HOST'].'/wp-content/uploads' );
    

    If you want to use avatars from another site, you will likely need to add the site’s upload path (eg. ‘/sites/2’) to both paths.


    Bigue Nique
    Participant

    @biguenique

    Here is the solution for forcing BP uploads form every MULTIBLOG-enable network sites to be stored on (and fetched from) the main site : https://buddypress.trac.wordpress.org/ticket/6931#comment:1

    To put it simple, simply create a file wp-content/plugins/bp-custom.php and paste in the code from this gist: https://gist.github.com/imath/91d56292673e6de61597

    The code speaks for itself.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar