(a) Except as provided in subsection (b), the validity of a cooperative's action may not be challenged on the ground that the cooperative lacks or lacked the power to act.
(b) A cooperative power to act may be challenged in a proceeding by:
(1) A member against the cooperative to enjoin the act;
(2) The cooperative directly, derivatively, or through a receiver, trustee, or other legal representative, against an incumbent or former director, officer, employee or agent of the cooperative; or
(3) The attorney general and reporter under § 43-38-1017.
(c) In a member's proceeding under subdivision (b)(1) to enjoin an unauthorized cooperative act, the court may enjoin or set aside the act, if equitable and if all affected persons are parties to the proceeding, and may award damages for loss, other than anticipated profits, suffered by the cooperative or another party because of enjoining the unauthorized act.