• I found the GitHub repository for this plugin. Awesome work and project, btw.

    Can you confirm that all the database connections and access is in the db.php file? https://github.com/tbenyon/wordpress_external_login_plugin/blob/master/login/db.php

    So, if I wanted to adapt this to another database or even a cloud database API service like DynamoDB, I would re-write parts of the db.php file.

    I see there are if-then statements to specify either PostgreSQL or MySQL right now. I would probably just do an extra db type like “dynamo” and the select queries would be replaced by requesting the external API to get the user data that matches the WordPress user data.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author tbenyon

    (@tbenyon)

    Hey @kevent,

    You ceraintly could do that. All the database logic should be in that file for that very reason. It does need tidying and I want to use a PDO to add better compatibility and less work for me. 😛

    I would be really cool to help this work for others by making a pull request when you’ve got it working so others could make use of your work.

    No pressure to.

    I’m happy to support you with this if you have any more questions.

    Thanks,

    Tom

    Thread Starter kevent

    (@kevent)

    I would definitely make a pull request. I am not at the stage of adding this, yet. I’m doing some due diligence on the External Login plugin as a solution for me to offload the WordPress user tables to an external database.

    Regarding using PDO (and some tidying) that’s a very good idea. I think that would be an important improvement prior to me adding the external DB cloud API’s. That code would look significantly different than the current db.php.

    Do you have an idea of how you would approach the tidying up of the db.php and using PDO?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘External Database Connection Question’ is closed to new replies.