Users dont know which topics they posted in? unless is quite old, seems odd, but hey – not judging! 😉
not exactly sure what you are trying to do with this code… Adding another query like that would be a significant performance hit… and not sure what you are doing with that query… you getting a list of post ids, but you really want to know if there is any poster ids that match the current user… so if you insisted on the query, do a get_var() and just return the first post id where the poster was the user… then you can just see if you have a value for the post id and get rid of the num_rows() too…
perhaps I would suggest that you take a look at our inspector… forum – toolbox – data inspector… with it you can see much of the large amounts of data already available to you on any given page…
for example, dont do the expensive wp_get_current_user() as you dont neeed all that info… simply use the global variable $spThisUser… the ID would be $spThisUser->ID… and just for grins, wp has a global variable as well called $current_user so you dont need to fill it…
but actually, having read through this a couple more times, you actually want to know this on forum view.. and know if current user posted in the listed topics… was originally thinking topic view..
Like Andy says, when we implement the notification system edge case desirements like this should be more possible directly…