MyBB Community Forums

Full Version: Get uid from private message
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
How do i get uid , pmid and such from a private message?


echoing

$mybb->privatemessages['pmid']
or
$mybb->input['pmid']
returns blank in my template.


Thanks.
Variables in templates need to have curly braces around them. It also depends on if you want it for when you are reading a PM or just when you are viewing the list of PMs.

For viewing an individual PM you will want to use {$pmid} for the PM id. The others you can use {$pm['field_name_here']}.

If you are viewing the list of PMs, you'll want to use {$message['field_name_here']}.
Thank you, that solved my problem.