Forums

Sharing user data between WordPress sites. (7 posts)

  1. oliverhutcheon
    Member
    Posted 5 years ago #

    I have two domains, each running WordPress and I want people who register on one to be able to log in to the other without re-registering. Any ideas?

    There are two solutions that I can see.

    1. Modify one to manipulate the user data in wp_users and wp_usersmeta in the other, as a sort of 'master' list.

    2. Add code to make both add in the user data to each others tables and build synchronous user tables.

    Either way, its a headache. Has anyone heard of anyone trying this before?

    Thanks,

    Oliver.

  2. oliverhutcheon
    Member
    Posted 5 years ago #

    More info..

    after reading many of the posts on here about multiple blogs and single users it seems its a common problem but one that has only been solved if you've got everything running on the same database.

    As I only need shared registration I'm looking at a hack of the wp_insert_user() function in registration.php to cross write the data to the other domains database. This would need a tweak of the permissions in the cpanel of each domain to allow access from a new domain (other than localhost).

    This should maintain two sets of user data simultaneously.. I think.

    Possible?

  3. oliverhutcheon
    Member
    Posted 5 years ago #

    I've done this now..

    If anyone wants to see the code then ask and I'll post it here. Its a very simple hack.

    Ol.

  4. zappoman
    Member
    Posted 5 years ago #

    I'd be curious to see your solution.

    Have you dealt with sharing roles for the users? Namely it seems like your users will need to have an appropriate capabilities and roles setting in WP to be able to do much at all. Do you have that working properly?

  5. scormeny
    Member
    Posted 4 years ago #

    Hey, Oliver, I'd love to talk with you about this hack, please email me at sara@paperlantern.com if you see this.

    Thanks!

  6. andreacimatti
    Member
    Posted 4 years ago #

    C'mon Oliver...share the hack with us or at least give us some hints as to how you achieved this.

  7. austinkenny
    Member
    Posted 4 years ago #

    Has anyone got the code for this yet?

Topic Closed

This topic has been closed to new replies.

About this Topic