We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Validating Logins against an outside DB

How Do I?

Jeremy S.'s avatar
Jeremy S.
353 posts
8 years ago
Jeremy S.'s avatar Jeremy S.

Just curious if anyone has done anything like the following with EE?

I have a client where EE is used for a magazine publication. However, they now want to create a member’s area on this EE website, but the issue is that the membership data is contained on another system (MSSQL DB) they they use to admin day-to-day member needs in-house (it’s a non-profit). So it’s not a case of just doing an import and going from there.

So I need a way for a member to log into the EE site, and instead it checks against that external DB for validity. Basically just checking user/password and if their membership is active. Maybe their first name to personalize the site.

Should this just bypass all EE membership functions and be custom? I don’t need profiles etc…

Any thoughts would be much appreciated. Has anyone done anything in the realm?

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

It’s not a pleasant task dealing with two separate membership systems, but some have had success with aMember Pro. One user in Slack even mentioned possibly building a Zapier integration for it.

       
Hop Studios's avatar
Hop Studios
481 posts
8 years ago
Hop Studios's avatar Hop Studios

What we did, when we needed to use an outside DB as the master member source, is we created an add-on that:

  • hijacks the login of every non-superadmin member, and does a background lookup against the external DB
  • but we don’t do this with superadmin EE accounts, for security reasons (no one can create or login with a superadmin account except within EE itself)
  • if the member logged in there correctly, it sends back the full current member record
  • if the member didn’t exist in EE, creates one
  • if the member does exist, overwrites whatever’s in the EE DB (because the external DB is the master) with the returned member record

You can still use additional member fields in EE for extra EE-specific reasons / data

There’s still the issue of how do people create / update the external DB, but for the purpose of this, let’s assume that already exists and works just fine and isn’t my problem 😊

       
Jeremy S.'s avatar
Jeremy S.
353 posts
8 years ago
Jeremy S.'s avatar Jeremy S.

Thanks for the replies, Derek and Hop Studios.

Hop Studios, the details you provided are helpful, and in comparing my requirements, they are actually less in that:

  • We don’t need to create accounts or serve/manage the user profiles, only validate they have access to the content by being a current member of the “master” database.
  • It’s essentially one way/read-only and the user will not have any ability to change their account/profile on EE. They’ll have to use the primary system’s web access to do so.

As to your last comment, it’s fully functioning Membership software the non-profit uses so maintaining that data is already done. It’s specialized to what they do, so they prefer to keep it rather than operate membership within EE.

It seems like a plugin, that doesn’t address/require the EE membership system would be the best route.

Thanks again. As I work through this, it seems less daunting then I initially thought.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.