Code of Civil Procedure – Section 1987.1.
(a) If a subpoena requires the attendance of a witness or the production of books, documents, or other things before a court, or at the trial of an issue therein, or at the taking of a deposition, the court, upon motion reasonably made by any person described in subdivision (b), or upon the court’s own motion after giving counsel notice and an opportunity to be heard, may make an order quashing the subpoena entirely, modifying it, or directing compliance with it upon those terms or conditions as the court shall declare, including protective orders. In addition, the court may make any other order as may be appropriate to protect the person from unreasonable or oppressive demands, including unreasonable violations of the right of privacy of the person.
(b) The following persons may make a motion pursuant to subdivision (a):
(1) A party.
(2) A witness.
(3) A consumer described in Section 1985.3.
(4) An employee described in Section 1985.6.
(5) A person whose personally identifying information, as defined in subdivision (b) of Section 1798.79.8 of the Civil Code, is sought in connection with an underlying action involving that person’s exercise of free speech rights.
(c) Nothing in this section shall require any person to move to quash, modify, or condition any subpoena duces tecum of personal records of any consumer served under paragraph (1) of subdivision (b) of Section 1985.3 or employment records of any employee served under paragraph (1) of subdivision (b) of Section 1985.6.
Code of Civil Procedure – Section 1987.2.
(a) Except as specified in subdivision (b), in making an order pursuant to motion made under subdivision (c) of Section 1987 or under Section 1987.1, the court may in its discretion award the amount of the reasonable expenses incurred in making or opposing the motion, including reasonable attorney’s fees, if the court finds the motion was made or opposed in bad faith or without substantial justification or that one or more of the requirements of the subpoena was oppressive.
(b) If a motion is filed under Section 1987.1 for an order to quash or modify a subpoena from a court of this state for personally identifying information, as defined in subdivision (b) of Section 1798.79.8 of the Civil Code, for use in an action pending in another state, territory, or district of the United States, or in a foreign nation, and that subpoena has been served on any Internet service provider, or on the provider of any other interactive computer service, as defined in Section 230(f)(2) of Title 47 of the United States Code, if the moving party prevails, and if the underlying action arises from the moving party’s exercise of free speech rights on the Internet and the respondent has failed to make a prima facie showing of a cause of action, the court shall award the amount of the reasonable expenses incurred in making the motion, including reasonable attorney’s fees.
History of 2008 Amendments:
2008 — Assembly Bill 2433 (Krekorian), signed into law Sept. 30, 2008, by the Governor, effective Jan. 1, 2009. For the Electronic Frontier Foundation’s blog post on the bill’s enactment, see Blog Post.