Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to get the ID of the Forum Last Active Author?

Viewing 3 replies - 1 through 3 (of 3 total)

  • Robin W
    Moderator

    @robin-w

    $author = bbp_get_author_link( array( 'post_id' => bbp_get_forum_last_active_id($forum_id)) ;


    Radzio125
    Participant

    @radzio125

    Thanks for answer. Unfortunately I want to get only user ID number. I want use this to do something like this:

    $last_author = id_of_the_forum_topic_last_active_user
    $user = get_user_by('login',$last_author);
    if (is_user_online($user->ID)) {
    } else {
    }

    What do I need to put in place of the id_of_the_forum_topic_last_active_user?


    Robin W
    Moderator

    @robin-w

    $post_id = bbp_get_forum_last_active_id($forum_id)) ;
    $last_author  = get_post_field ('post_author', $post_id);
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar