(a) (1) The clerk shall allow access to limited civil case records filed under this chapter, including the court file, index, and register of actions, only as follows:
(A) To a party to the action, including a party’s attorney.
(B) To a person who provides the clerk with the names of at least one plaintiff and one defendant and the address of the premises, including the apartment or unit number, if any.
(C) To a resident of the premises who provides the clerk with the name of one of the parties or the case number and shows proof of residency.
(D) To a person by order of the court, which may be granted ex parte, on a showing of good cause.
(E) To any person by order of the court if judgment is entered for the plaintiff after trial more than 60 days since the filing of the complaint. The court shall issue the order upon issuing judgment for the plaintiff.
(F) Except as provided in subparagraph (G), to any other person 60 days after the complaint has been filed if the plaintiff prevails in the action within 60 days of the filing of the complaint, in which case the clerk shall allow access to any court records in the action. If a default or default judgment is set aside more than 60 days after the complaint has been filed, this section shall apply as if the complaint had been filed on the date the default or default judgment is set aside.
(G) In the case of a complaint involving residential property based on Section 1161a as indicated in the caption of the complaint, as required in subdivision (c) of Section 1166, to any other person, if 60 days have elapsed since the complaint was filed with the court, and, as of that date, judgment against all defendants has been entered for the plaintiff, after a trial.
(2) This section shall not be construed to prohibit the court from issuing an order that bars access to the court record in an action filed under this chapter if the parties to the action so stipulate.
(b) (1) For purposes of this section, “good cause” includes, but is not limited to, both of the following:
(A) The gathering of newsworthy facts by a person described in Section 1070 of the Evidence Code.
(B) The gathering of evidence by a party to an unlawful detainer action solely for the purpose of making a request for judicial notice pursuant to subdivision (d) of Section 452 of the Evidence Code.
(2) It is the intent of the Legislature that a simple procedure be established to request the ex parte order described in subparagraph (D) of paragraph (1) of subdivision (a).
(c) Upon the filing of a case so restricted, the court clerk shall mail notice to each defendant named in the action. The notice shall be mailed to the address provided in the complaint. The notice shall contain a statement that an unlawful detainer complaint (eviction action) has been filed naming that party as a defendant, and that access to the court file will be delayed for 60 days except to a party, an attorney for one of the parties, or any other person who (1) provides to the clerk the names of at least one plaintiff and one defendant in the action and provides to the clerk the address, including any applicable apartment, unit, or space number, of the subject premises, or (2) provides to the clerk the name of one of the parties in the action or the case number and can establish through proper identification that he or she lives at the subject premises. The notice shall also contain a statement that access to the court index, register of actions, or other records is not permitted until 60 days after the complaint is filed, except pursuant to an order upon a showing of good cause for access. The notice shall contain on its face the following information:
(1) The name and telephone number of the county bar association.
(2) The name and telephone number of any entity that requests inclusion on the notice and demonstrates to the satisfaction of the court that it has been certified by the State Bar of California as a lawyer referral service and maintains a panel of attorneys qualified in the practice of landlord-tenant law pursuant to the minimum standards for a lawyer referral service established by the State Bar of California and Section 6155 of the Business and Professions Code.
(3) The following statement:
“The State Bar of California certifies lawyer referral services in California and publishes a list of certified lawyer referral services organized by county. To locate a lawyer referral service in your county, go to the State Bar’s Internet Web site at www.calbar.ca.gov or call 1-866-442-2529.”
(4) The name and telephone number of an office or offices funded by the federal Legal Services Corporation or qualified legal services projects that receive funds distributed pursuant to Section 6216 of the Business and Professions Code that provide legal services to low-income persons in the county in which the action is filed. The notice shall state that these telephone numbers may be called for legal advice regarding the case. The notice shall be issued between 24 and 48 hours of the filing of the complaint, excluding weekends and holidays. One copy of the notice shall be addressed to “all occupants” and mailed separately to the subject premises. The notice shall not constitute service of the summons and complaint.
(d) Notwithstanding any other law, the court shall charge an additional fee of fifteen dollars ($15) for filing a first appearance by the plaintiff. This fee shall be added to the uniform filing fee for actions filed under this chapter.
(e) This section does not apply to a case that seeks to terminate a mobilehome park tenancy if the statement of the character of the proceeding in the caption of the complaint clearly indicates that the complaint seeks termination of a mobilehome park tenancy.
(f) This section does not alter any provision of the Evidence Code.