Which would be OK, if these lines:
PHP Code:
if ($post['userid'] AND $parser->ces_options['current_userid'] != $post['userid'])
{
$parser->ces_options['current_userid'] = $post['userid'];
}
... weren't resetting current_userid to the id of whoever happened to post the last Visitor Message.
So the code after that is looking for the wrong cached permissions, not finding them, and executing the wrong branch (the stuff that AND's with the $bbfoo's).
EIDT ... changing that 'if' to this seems to fix it.
PHP Code:
if ($forumid != 'ces_profile' AND $post['userid'] AND $parser->ces_options['current_userid'] != $post['userid'])
Although as before, I haven't done any corner case testing, so who knows if that'll break something else ...
-- hugh