(a) It is unlawful for any person while serving as a constitutionally elected peace officer, or as such officer's deputy, or any duly elected or appointed county official to act as a professional bondsman, directly or indirectly.
(b) This section shall not apply to any duly elected member of the county legislative body.