PDA

View Full Version : UserID in private message


footose
01-05-2009, 01:47 AM
I'm having an issue where the userid in private messages cannot be access by using...

$post[userid]

.. instead of returning the poster's user id, it returns the ID of the person that you are sending the message too....

THis kind of wrecks my "plugin" because I use $post[userid] to put a link under the username of the postbit using the $template_hook[postbit_userinfo_left] hook.

Is there a "generic" way to get the userid from the poster regardless of where they are on the site?

Kirk Y
01-05-2009, 02:50 PM
Use $bbuserinfo (or $vbulletin->userinfo if inside a plugin). This will always return the currently viewing user's information.