Should work.
Are you sure it dies have a valid record?
Btw:
I would implement it as
PHP Code:
function prs_can_moderate()
{
global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $postownership, $pieceexists, $post;
return (
($bbuserinfo['userid'] == $postownership['userid'])
OR
($bbuserinfo['userid'] == $pieceexists['userid'])
OR
($bbuserinfo['userid'] == $post['userid'])
OR
($bbuserinfo['usergroupid'] == 6)
);
Theoretically this should be faster then ifs.
But maybe PHP is smart enough to optimize this itself?