Wordpress experts - use another DB for members?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fusionx
    Confirmed User
    • Nov 2003
    • 4618

    #1

    Wordpress experts - use another DB for members?

    Does anyone have any info on using a membership table from another DB for WordPress?

    I have a links directory with a blog, and I want them to share a DB for members, eg, you log into one you log into both..

    Not sure how possible this is..
  • GigoloShawn
    Confirmed User
    • Oct 2007
    • 700

    #2
    It's pretty easy.

    Code:
    define('CUSTOM_USER_TABLE', 'wp2_users');
    define('CUSTOM_USER_META_TABLE', 'wp2_usermeta');
    I no longer represent TrafficGigolos, please contact Justin or Rebecca with any issues.

    Comment

    • woj
      <&(©¿©)&>
      • Jul 2002
      • 47880

      #3
      Originally posted by GigoloShawn
      It's pretty easy.

      Code:
      define('CUSTOM_USER_TABLE', 'wp2_users');
      define('CUSTOM_USER_META_TABLE', 'wp2_usermeta');
      probably will need a bit more to make it work with a different script...
      Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
      Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
      Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

      Comment

      • FlexxAeon
        Confirmed User
        • May 2003
        • 3765

        #4
        yeah u gotta make sure the user tables line up, that the headers don't conflict, etc

        search support forums on wordpress site - it's been done many times over but quite a few factors are involved
        flexx [dot] aeon [at] gmail

        Comment

        • fusionx
          Confirmed User
          • Nov 2003
          • 4618

          #5
          there's also routines needed to handle cookie creation, etc.. I'd imagine..

          Comment

          • GrouchyAdmin
            Now choke yourself!
            • Apr 2006
            • 12085

            #6
            Originally posted by GigoloShawn
            It's pretty easy.

            Code:
            define('CUSTOM_USER_TABLE', 'wp2_users');
            define('CUSTOM_USER_META_TABLE', 'wp2_usermeta');
            That's all you need for using a different table on the same SQL server between WordPress installs these days.

            If you're sharing with a different script, obviously you'll have to have someone roll it for you.

            Comment

            • cryptie
              Confirmed User
              • Jul 2007
              • 114

              #7
              you cannot share cookies cross-domain without some serious hacking :p

              however, you can easily have them login twice in both sites.

              note in shawns example, you must be using the same database,
              Signature coming soon! Just as soon as my first site goes live! ETA this weekend

              Comment

              Working...