php, cookies, wordpress – how to make automatic login in one one site, login and on other one

Hi i have two wordpress sites, that are almost identical but have different domains.

What i need to make is when you login on one site of wordpress that it would login with same username and password on other site.

I know this could have some security issues, but this does not matter i just need to make this task.

I know the principals, how it should work, one page in login request other to login user with same username or other way around when you go into one site it checks if user is logged in in other one.

But how to do so in code ? php, wordpress, cookies ?

Ideas ? Functions ? How to send request by php ?

Thank you

Edit : Users are synchronized on both sites, user should not be able to see anything about second login. How to send such url request via php ? User logins in in one site by entering username and password it is automatically logged to other, if he come to second site he is already logged in.

RIP Steve Jobs !

Leave a Comment