Can a wordpress user keep logged in another server? -


I have a woprpress site and that user does not need to automatically login to another server when he Will visit that site. Is this possible?

You can set cookies or sessions or etc ... with this data you can run Auto Login Function My Example:

  function auto_login () {// It is completely $ user_login = 'admin'; // does not work even when setting the same variable through a string string? User = admin // $ user_login = $ _GET ['user']; // Get user ID $ user = get_userdatabylogin ($ user_login); $ User_id = $ user- & gt; Id; // login wp_set_current_user ($ user_id, $ user_login); Wp_set_auth_cookie ($ user_id); Do_action ('wp_login', $ user_login); } Add_action ('init', 'auto_login');  

Comments