We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48282
    • 6 Posts
    I am in need of guidance... we have a member's only section of our website. Currently "new members" register through our e-commerce site (MagentoGo - which is shutting its doors) and current members' credentials are validated with the e-commerce database. MagentoGo's database then pushes that info to Pardot so we can send them their weekly marketing content. So I need to reroute and store user credentials in a new database and need new login and log off scripts. We are hosted with hostgator and we have Pardot at our disposal if it is something that can be housed with them.

    I admit I am a noob, though I learn quickly, I just don't know what I don't know. I have moved a copy of our website to a staging server to allow me to test out the new database and user management before I push it live. If you need more information, just ask and I will update as soon as possible.

    Thanks.
    -VG

      • 3749
      • 24,544 Posts
      There are various ways to approach this. One would be to just make them regular users and migrate their MagentoGo usernames and passwords into the modx_users table. This would allow you to use everything in the Login extra package with no modifications, though the migration would take some effort.

      Another way to go would be to do what Discuss does, which is to create a new object that extends modUser (disUser in this case) and keep a duplicate table that basically mirrors the modx_user table, but with some extra fields. This is kind of a pain because it requires some work to keep the tables synchronized and it's easy to get it wrong and corrupt things.

      A third way (what I would probably do if not using method one above) is to use the ClassExtender extra to create a custom DB table for the user credentials (and any other user data that doesn't fit in the existing MODX tables). This is relatively easy to do, and it's very fast, but it may require some custom PHP programming to meet all your needs. ClassExtender will do much of the work for you. http://bobsguides.com/classextender-class.html

      It's possible to write your own Login code that goes in a Plugin connected to the OnBeforeWebLogin or OnBeforeManagerLogin events. You can check the credentials and authenticate the user (or not), bypassing the regular Login process.


        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