Tag Info

New answers tagged

2

OK, simple solution after digging in the WordPress code. // get all sessions for user with ID $user_id $sessions = WP_Session_Tokens::get_instance($user_id); // we have got the sessions, destroy them all! $sessions->destroy_all(); This will log the user with ID $user_id out of WordPress. Use case: My use case for this is when a user is approved ...


0

You also need to define a matching COOKIEHASH for both sites - a random 32 bit string will do. By default, COOKIEHASH is an MD5 hash of the site URL, and is used to generate the default names for all authentication-related cookies. Hence why, at the moment, your cross-domain login isn't working (the names of the cookies aren't consistent, as COOKIEHASH will ...



Top 50 recent answers are included