/**
 * Does this user have an upgrade path?
 *
 * @since 2.5
 * @param int $user_id the ID of the user to check
 *
 * @return bool
 */
function rcp_has_upgrade_path($user_id = 0)
{
    return apply_filters('rcp_has_upgrade_path', (bool) rcp_get_upgrade_paths($user_id), $user_id);
}
/**
 * Filter levels to only show valid upgrade levels
 *
 * @since 2.5
 * @return mixed|void
 */
function rcp_filter_registration_upgrade_levels()
{
    remove_filter('rcp_get_levels', 'rcp_filter_registration_upgrade_levels');
    $levels = rcp_get_upgrade_paths();
    add_filter('rcp_get_levels', 'rcp_filter_registration_upgrade_levels');
    return $levels;
}