No sheriff, undersheriff, deputy sheriff, or person by either of them deputed to do any special act, shall, directly or indirectly, by himself or through others in any way suggest or indicate to, or advise any person having any proceeding or about to have any proceeding in any court, or other matter, that any attorney or firm of attorneys is desirable, or successful practitioners, or in any way do any act liable to influence or direct such person in his choice of attorneys. Nor shall any such sheriff, undersheriff, or deputy sheriff, appear or advise as attorney or counselor in the case, or in any court. Any sheriff, undersheriff, deputy sheriff, or person so specially deputed, who shall violate any one of the provisions of this section shall be deemed guilty of a misdemeanor, and for the first offense shall be fined Ten Dollars ($10.00), and on the second conviction shall be fined not less than Twenty-five Dollars ($25.00); and for the third offense, he shall be removed from office. The sheriff shall keep posted in each cell of the jail a list of the attorneys practicing in his county.
Okla. Stat. tit. 19, § 522