California Code Of Civil Procedure Section 809
When a defendant, against whom such action has been brought, is adjudged guilty of usurping or intruding into, or unlawfully holding any office, franchise, or privilege, judgment must be rendered that such defendant be excluded from the office, franchise, or privilege, and that he pay the costs of the action. The Court may also, in its discretion, impose upon the defendant a fine not exceeding five thousand dollars, which fine, when collected, must be paid into the Treasury of the State. (810.) Section Eight Hundred and Ten. When the action is brought upon the information or application of a private party, the Attorney General may require such party to enter into an undertaking, with sureties to be approved by the Attorney General, conditioned that such party or the sureties will pay any judgment for costs or damages recovered against the plaintiff, and all the costs and expenses incurred in the prosecution of the action.