(a)
Any person in possession of a firearm or any uniformed peace officer, private guard, or security personnel or any person who is wearing a uniform of a peace officer, guard, or security personnel, who is stationed in the immediate vicinity of, or posted at, a polling place without written authorization of the appropriate city or county elections official is punishable by a fine not exceeding ten thousand dollars ($10,000), by imprisonment pursuant to subdivision (h) of Section 1170 of the Penal Code for 16 months or two or three years, or in a county jail not exceeding one year, or by both that fine and imprisonment.
(b)
This section shall not apply to any of the following:
(1)
An unarmed uniformed guard or security personnel who is at the polling place to cast his or her vote.
(2)
A peace officer who is conducting official business in the course of his or her public employment or who is at the polling place to cast his or her vote.
(3)
A private guard or security personnel hired or arranged for by a city or county elections official.
(4)
A private guard or security personnel hired or arranged for by the owner or manager of the facility or property in which the polling place is located if the guard or security personnel is not hired or arranged solely for the day on which an election is held.