We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The function sucuriscan_unset_online_user_on_logout hooks wp_logout in order to remove the logged-in user from the online_users transient. https://github.com/Sucuri/sucuri-wordpress-plugin/blob/master/src/lastlogins-loggedin.php#L129
However that function searches for the user by:
$current_user = wp_get_current_user(); $user_id = $current_user->ID;
This always returns 0, as the wp_logout hook fires after setting user_id to 0.
Consequently, a user logout never succeeds in clearing the user from the list of online users.
A fix is to hook clear_auth_cookie instead of wp_logout.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The function sucuriscan_unset_online_user_on_logout hooks wp_logout in order to remove the logged-in user from the online_users transient.
https://github.com/Sucuri/sucuri-wordpress-plugin/blob/master/src/lastlogins-loggedin.php#L129
However that function searches for the user by:
This always returns 0, as the wp_logout hook fires after setting user_id to 0.
Consequently, a user logout never succeeds in clearing the user from the list of online users.
A fix is to hook clear_auth_cookie instead of wp_logout.
The text was updated successfully, but these errors were encountered: