Two aMembers - One Database

Discussion in 'Customization & add-ons' started by simplyr, Feb 26, 2011.

  1. simplyr

    simplyr Member

    Joined:
    Jul 25, 2010
    Messages:
    75
    Hey,

    I wasn't too sure where to post this, but here goes. It's kind of a weird problem. What I want is two separately licenses amembers, on different domains, to connect to one database.

    I have a website, domain1.com. My friend also has a website, domain2.com. We both have amember installed, we want both amembers to use the same database and that way all member records appear on both sites.

    This is not the same as amember remote, I do not want members of domain1.com to be able to just simply login to a protected area on a another domain. I want them to be able to login on either site, with the same details and have their records on both.

    Is this do able or not?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    As understood you already have customers on both installations?
    There is no problem to use one database for both installations, also this is possible to create plugin that will check other installation when user login and will add new user on the fly. The problem will be if you have users in both installations already, because there can be duplicate logins.
  3. simplyr

    simplyr Member

    Joined:
    Jul 25, 2010
    Messages:
    75
    Well we don't mind duplicate logins, we just want a system by which any single user can access the protected folders of the either site or their control panel on either site too.

    We tried to do it but on one domain we always have the license error...
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    if you have licenses for both domains, specify both licenses in amember CP -> Setup -> License one by one.
    This way single installation can be opened from both urls without license errors.
  5. simplyr

    simplyr Member

    Joined:
    Jul 25, 2010
    Messages:
    75
    I tried that, I will give it another go.

    Do both sites need to connect as different users to one database?
  6. simplyr

    simplyr Member

    Joined:
    Jul 25, 2010
    Messages:
    75
  7. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Please contact me in helpdesk and provide exact examples with exact urls.
  8. garywagner

    garywagner aMember Pro Customer

    Joined:
    Feb 5, 2011
    Messages:
    7
    Question:

    Now that I've combined the licenses in the main site - I also have Drupal integration to deal with.

    I have two Drupal sites each with their own independent content, but I would like them to share an Amember database. Meaning that we have one user database, but I do not wish users to be able to view content cross-site. In otherwords, users from Site A should only be able to view Site A's content (unless they also subscribe to Site B), and likewise for Site B.

    Would the Drupal sites also need to share a user database?
  9. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    No. You just need to install two drupal plugins and configure each to use own database.
    Then aMember will update both databases depends on product settings.
  10. garywagner

    garywagner aMember Pro Customer

    Joined:
    Feb 5, 2011
    Messages:
    7
    Ahh... so even though both Amember installs share the same database, I will still need to log into both Amember admin areas independently throughout the site lifecycle? I understand what you mean to configure each drupal plugin (we have purchased both a site license and drupal plugin for each install) to use the database. I remember seeing the drop-down menu to use the proper Drupal database.

    This is a little bit different than I had planned this to go. I had assumed we would only use one Amember installation (simply because they both connect to the same database) but it sounds like we will still need both systems. This is fine, and I thank you for your fast response.

    Can you think of anything else I will need to know in order to combine both Amember installations effectively?
  11. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    If you will setup both scripts to use the same database, you will not need to login twice. For example if you have aMember on site1.com/amember and on site2.com/amember and both scripts will use the same database, you can login to site1.com/amember/admin and will have access to all products and users.
  12. garywagner

    garywagner aMember Pro Customer

    Joined:
    Feb 5, 2011
    Messages:
    7
    I am very grateful for the response. I would like to ask if you can help me understand the Drupal side of this a little better.

    I completely understand one amember installation will show me both subscriptions for site1.com and site2.com.

    What about the signup process? Does the customer who is buying access to site1.com have to use site1.com/amember/signup.php? And the customer who is buying access to site2.com have to use site2.com/amember/signup.php?

    How else does Amember decide whether to add the user to site1.com's Drupal user list, or site2.com's Drupal user list (talking about the native Drupal access groups)?
  13. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    yes if you have licenses for both domains and aMember files on both domains.


    There will be two Drupal plugins and in result two access settings in product setup.
    So you can create product for site1.com and in product settings, enable drupal1 access. And do the same for second site.
  14. thachicc2000

    thachicc2000 New Member

    Joined:
    Oct 11, 2012
    Messages:
    14
    If I have 3 licence amember, can I setup 3 amember site use 1 database!?
  15. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Yes, it is doable.

Share This Page