Info
- 3 posts
- 2 voices
- Started 3 years ago by jldean
- Latest reply from jldean
- This topic is resolved
How to get poster name
-
- Posted 3 years ago #
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!
-
- Posted 3 years ago #
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... -
- Posted 3 years ago #
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
-
You must log in to post.