Forums

Join
bbPress Support ForumsPluginsHow to get poster name

Info

Tags

How to get poster name

  1. Hi

    I'm just trying to fix a plugin (Moderation Hold) so that it updates the 'Last Poster' field correctly when a post is approved.

    It currently uses this to set the poster id and name:
    $uid = $bb_post->poster_id;
    $uname = $bb_post->poster_name;

    But the user name doesn't get returned. Is there a correct function for this?

    Thanks!

  2. Try: get_topic_author() or something. There was a wiki where you could find the correct "tag" @ bbpulp.org but that one seems to be down at the moment...

  3. Ah yes - I had a bit of a fiddle and found bb_get_user

    $uid = $bb_post->poster_id;
    $bb_user = bb_get_user( $uid );
    $uname = $bb_user->user_nicename;

    This does the job fine :) Thanks

  4. You must log in to post.