If you want login a user by user ID without password then using the following code
wp_clear_auth_cookie(); wp_set_current_user($userID); wp_set_auth_cookie($userID, true, false); update_user_caches($userID);
Have any doubt, then comment here!
WordPress/PHP Developer Chennai
If you want login a user by user ID without password then using the following code
wp_clear_auth_cookie(); wp_set_current_user($userID); wp_set_auth_cookie($userID, true, false); update_user_caches($userID);
Have any doubt, then comment here!