It is inadvisable to adjust the core functionality related to password management.
Here is a database of hooks: https://adambrown.info/p/wp_hooks
As for Question 2, if you are not an experienced developer, the safest way is likely to use a plugin.
This one came up on Google, I have not used it myself:
https://wordpress.org/plugins/share-logins/
You may also like to read these:
https://developer.wordpress.org/rest-api/reference/users/
https://kinsta.com/blog/share-logins-wordpress/
Hi carike,
Is there a difference between using REST API and writing my own code in a webhook to insert the user via php/mysql? Is a mysql statement with a password not secure, good way to insert a new user on a different site?
the negatives with rest-api, that I’ve found:
– it seems much more complicated? more issues to deal with
– need to use a plug due to user not having rights to insert (post)
– many plugins dealing with this are old or not trusted?
– examples for complete scripts for rest api are few and far between… can’t comprehend why WordPress doesn’t provide some? As in the documentation is very limiting.
thanks
> need to use a plug due to user not having rights to insert (post)
The REST team is working on a native (core) authorization alternative to cookie authorization as a goal for this year, but I don’t expect that will be ready before next year.
> writing my own code in a webhook to insert the user via php/mysql
How would you be transmitting the information from the one site to the other?
You would need some form of API.
> https://kinsta.com/blog/share-logins-wordpress/
Have you had a look at that article?
The way that they do it, rather than sending a user’s info from one site to another (and trying to secure that), either via the REST API, or some other method, is to actually have the two sites share the same wp_users table.