(a) Except as provided in Chapter 10 (commencing with Section 1054) of Part 2 of Title 7, or for cases in which the alleged victim of a sex offense, as specified in subdivision (f) of Section 293, has not elected to exercise his or her right pursuant to Section 6254 of the Government Code, the court, at the request of the alleged victim, may order the identity of the alleged victim in all records and during all proceedings to be either Jane Doe or John Doe, if the court finds that such an order is reasonably necessary to protect the privacy of the person and will not unduly prejudice the prosecution or the defense.
(b) If the court orders the alleged victim to be identified as Jane Doe or John Doe pursuant to subdivision (a) and if there is a jury trial, the court shall instruct the jury, at the beginning and at the end of the trial, that the alleged victim is being so identified only for the purpose of protecting his or her privacy pursuant to this section.
(Amended by Stats. 2016, Ch. 644, Sec. 3. (AB 2498) Effective January 1, 2017.)