Reply To: One Off Identities or Posting As Multiple Users
I did some thinking around this last night.
Basically bbpress looks for an author ID in the posts table.
Now there’s a hook in the topic/reply handlers (topic for topics, reply for replies, so they mirror) after a topic/reply is created.
do_action( ‘bbp_new_reply_post_extras’, $reply_id );
so if each of your characters has a WordPress user ID, then you could just hook to this, and change the post author to the worpress user ID.
so say
add_action ('bbp_new_reply_post_extras' , 'your function') ;
function your_function ($reply_id) {
$id = [either use the $_POST if still available and maybe have the value as the WordPress user ID , or get_post_meta for d20_character in the reply_id and do a look up to translate value to WordPress user ID]
$my_post = array(
'ID' =>$reply_id,
'post_author' => $id,
);
// Update the post into the database
wp_update_post( $my_post );
}
that way each topic/reply has a real author that happens to be your character chosen in the topic/reply form.
that would save a ton of coding in the output, and risk of missing one and exposing the real user.