Most likely, the user_id will be retrieved with whatever post you are retrieving, be it a PM, a post, or custom data from a mod. In code you will should always
have the user_id. What you might have to look for is the username. But more to the point, with either a username or user id, you can get the other. This should be enough to get you started:
Code: Select all
user_get_id_name ($user_id_ary, $username_ary); //important part!
$username = $username_ary;
$user_id = $user_id_ary;
Take a look through includes/functions.php... that's where you'll find most of the goodies you'll need to access forum data.