Pondering...Can't see why it would not work, after all, it is just a call to the DB to look up a status and set a value.
Note...I am also using this if it makes a difference...
Code:
if (($bbuserinfo[usergroupid] ==5) || ($bbuserinfo[usergroupid] ==6) || ($bbuserinfo[usergroupid] ==7) or ($post[username] == $bbuserinfo[username])) {
$edittext = htmlspecialchars($post[pagetext]);