bug 1136: fixed returns and revoke_cert calls
bug 1136: fixed references $id and $userid