MyBB Community Forums

Full Version: Get poster uid from post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, i have a plugin that prints a code when the users write a key words in a post. Works similar to a spoiler, but getting data from a custom db. Now i need to get the user id (of the person who made the post) from the plugin, and i dont know how. Im kinda new in plugin dev. As far as i know,  with global $mybb i only get the user that see the post, but cant get current post data. 

I have this hook $plugins->add_hook("parse_message", "tecnicatag_run"); tecnicatag_run its the "spoiler", and i guess parse_message its the post content. I need the current $post so i can access de $post->uid. Ty for help.
Why don't you use the hook "postbit"? Or I don't understand your intention. The best thing is to post the whole code.
Hi, i fixed it. Was really simple, just put $post on the global vars and then take it frome there with $post['uid']. Ty for help in any case