We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49407
    • 159 Posts
    I have seen posts about this from 7-8 years ago with no solution.

    What I am trying to accomplish is having a common user table in the database for multiple Modx installations. This way I can have a common login and not ask users to create multiple accounts.

    Is there a config setting I can add to config.inc.php to specify the user table? This would be the simplest and most portable way that I can imagine.

    As always I appreciate the help I've gotten here. The Modx community is great!

    This question has been answered by aaronkent. See the first response.

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That's what Contexts are for. Managing multiple domains with a single MODX installation, instead of having multiple installations.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • discuss.answer
        • 49407
        • 159 Posts
        I solved this using contexts, however, I would still like to know if it is possible to do this without using multiple contexts...

        Does anyone know?
          • 3749
          • 24,544 Posts
          I doubt it. Each MODX site has one DB table listed in the config file and will use it for all tables. I don't know of a way around this.

          You could probably write a plugin that updated the other DB table whenever user data changed, but I'm not sure how reliable it would be.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 49407
            • 159 Posts
            Quote from: BobRay at Jul 03, 2015, 04:30 PM
            You could probably write a plugin that updated the other DB table whenever user data changed, but I'm not sure how reliable it would be.

            That's kinda what I was thinking originally but then I thought if you could hook the PDO to add a setting in the config file then you could specify a user table that was "outside" the table prefix for a second install. That would probably only be useful in rare situations, that I can't come up with an example for. For me contexts are working fine.

            I must be getting old because I forgot you could run multiple domains using contexts, only put Modx development aside for 7 months and forgot a lot of key, important features. tongue

            Thanks, Susan, Bob. Enjoy your weekend!