If any candidate, who has been nominated or elected, is found by any court of this Commonwealth in criminal proceedings to have wilfully accepted any contributions or made any expenditures in contravention of this act, either directly or through the treasurer of any committee authorized by section 1623 or through any other person with his knowledge or consent, whether expressly or not, that fact shall be certified by the court to the Attorney General. In the case of a candidate for nomination the Attorney General shall make a motion to the proper court to remove the candidate's name from the ballot. In the case of an elected candidate the Attorney General shall file in the proper court a suggestion for a writ of quo warranto against such candidate. If upon the hearing of such motion or writ, it shall be determined that such candidate has wilfully accepted any contribution, or made any expenditure in contravention of this act, either directly or through the treasurer of any committee authorized by section 1623 to pay or incur primary or election expenses in furtherance of his candidacy or through any other person with his knowledge and consent, whether expressly authorized or not, judgment of ouster from nomination, in the case of a candidate for nomination where the judgment is entered prior to the subsequent election, or judgment of ouster from office in the case of a candidate for election or in the case of a candidate for nomination who has been subsequently elected to the office for which he was nominated, shall be entered against him. However, in the case of a candidate elected to the office of Senator or Representative in the General Assembly, the decision of the court shall be certified to the President of the Senate or to the Speaker of the House of Representatives, as the case may be.
25 P.S.§ 3257