Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to get poster name

  • 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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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…

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar