remove temp var; make #profiles_by_status return either #active_or_pending_profiles or #neither_active_nor_pending_profiles