In California, generally, the only time a person is required to identify themselves is when stopped for a violation of the vehicle code while operating a motor vehicle and while being booked after arrest (including cite and release). Photo ID is only required for the vehicle stop.
Penal code section 647(e) USED TO require persons to present "credible and reliable" identification to a peace officer upon demand if suspicious circumstances warranted it. However, the US Supreme Court ruled in the case of Kolender v. Lawson (461 U.S. 352 (1983)) that this requirement was unconstitutional and the law was struck down and eventually removed from the penal code.
The more recent case of Hiibel v. Sixth District Court of Nevada (542U.S. 177 (2004)) ruled that states that have "stop and identify" statues can enforce them if based upon reasonable suspicion. However, the court did not rule that photo identification must be presented. Verbal identification is sufficient.
Since California does not have a stop and identify statute anymore, there is no requirement that a person identify themselves during a detention. I've seen an argument that Penal Code section 148(a)(1), Resist, Delay or Obstruct a Peace Officer, could be be filed but this is untested and probably wouldn't pass constitutional muster in the way the law is written.
UC Berkeley Legal Studies