Hi i have bbPress forum and i want to display information about user online status in posts comments.
- If comment author is logged in: online
- If comment author is logged out: offline
- If comment author doesn't have an account: not registred
How do this correctly? I found only something like that:
add_action('user_online_status', 'bbp_user_online_status');
function bbp_user_online_status(){
global $bbpuos_options;
echo '<ul>';
$user_id = bbp_get_reply_author_id($reply_id);
if ($bbpuos_options['activate'] == true) {
echo '<li class="bbp-online-status">';
if (is_user_online($user_id)) {
echo 'online';
} else {
echo 'online';
}
echo '</li>';
}
}
I try change this:
$user_id = bbp_get_reply_author_id($reply_id);
To this but it doesn't work:
$user_id = get_comment_author($comment_ID);