It sounds like this would do part of what you’re looking for but I would just like to clarify the flow.
Every time the user logs in to WordPress, the plugin will first try to login the user with the external database of users.
If it can connect to the external database and the user is found, it will use the external database to try and authenticate the user.
If their password was correct it will create their user in the WordPress database. If a user with that username already exists it will update that users password and other information from the external database.
This would ensure the password was up to date every time they logged in to WordPress.
If the database can’t be connected to, it will try and login the user using the WordPress database (but there is a setting to turn that off called “Disable Local Login”).
The plugin does nothing to move data from WordPress to the external database. However, there is a hook you can use that fires after the user has been authenticated that would allow you to run queries then.
Let me know if you have any other questions 😊
Thank you dear, install your plugin to my wordpress but I can’t find a way to connect it to my MSSQL database, it gives me 500 error, I can’t think what to do, could you help me?
Regarding this 500 error. Can you tell me:
- What you click/press to make the error appear? The test button in the settings page?
- Do you get any other information with the error?
- Do any errors appear in your PHP error logs at the time you did this action?
Hi Tom, when I hit the “connection test” button, I get an error 500 and checking in MSSQL I saw that it seems that I connected but you don’t do the queries properly, and I’m sure I put the names of the tables correctly. Sorry for my english is not my native language 😀
This reply was modified 3 years, 2 months ago by fabianesm.
Thanks for the info.
A 500 error indicates that it is an error on your external database. You really need to look at the error logs on that server to see why it returned a 500.
If you can’t see anything there you could look to see if there are any errors in your php error logs at the moment you clicked this button.
I can’t really help you unless we can get more information on what the error was.
Some things to double check:
- Is your ‘Database Type’ setting definitely set to MSSQL?
- Are there definitely users in your external user table?
- Have you definitely spelt the name of your database and the table correctly in your settings
Thanks for the input @bradmkjr!
Did you have any luck with Brads or my ideas of things to check?