Home » Wordpress » How to get bbpress Topic author id and current user id

Here is code which will show you wordpress bbpress topic author ID and wordpress current user id.

<?php 
$author_id = get_the_author_meta('ID') ;
$currentuserID = bbp_get_current_user_id();
echo 'Author ID '. $author_id .'';
echo 'Current User Id' .$currentuserID.'';
 ?>

Array ( [0] => Wordpress )