Wrote this:
add_rewrite_tag( '%custom%', '([1]{1,})' );
add_rewrite_rule( 'users'. '/([^/]+)/custom/&$', 'index.php?' . 'bbp_user' . '=$matches[1]&custom=1', 'top');
But when you go to the page user/admin/custom, 404 page is displayed
probably need to somehow add a add_rewrite_tag and add_rewrite_rule, but tell me, please, how it is