MyBB Community Forums

Full Version: what is my_post_key
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
what is my_post_key in delete link in ajax based post deletion. is this dynamically generated each time ? and which variable has value for it ?
$mybb->post_key is just a variable that contains a unique key/identifier for your user account. It's used to verify that requests sent to the server are actually from you. If someone attempts to spoof a URL request but has the wrong post key, MyBB will flag an error.
Edit: delayed response

headerinclude template consists of var my_post_key = "{$mybb->post_code}"; and it is a constant throughout the login session
It's one thing keeping this from working:

<img src="newreply.php?tid=159335&amp;processed=1&amp;action=do_newreply&amp;subject=Lol&amp;message=Fake+Reply">