reusing filter_by_user logic