I was trying to do some pre-emptive checks on a document before letting a user edit it, so I've got a little plugin firing on the OnDocFormPrerender event, and it works: when a user doesn't meet my qualifications, I execute this bit of code:
$modx->sendRedirect(MODX_MANAGER_URL);
It's all working, but I notice that the resource gets marked as locked after I redirect. How can programmatically unlock the resource before I redirect?