During the dependency proceedings, the juvenile court issued a three-year restraining order against the minor’s father pursuant to Welfare and Institutions Code section 340.5, restraining him from contacting the social worker on the case, who he had threatened. Father appealed, arguing that the trial court lacked jurisdiction to issue the three-year restraining order after the social worker was no longer assigned to the case. The appellate court rejected his argument and affirmed. The Legislature did not intend the social worker’s protection to end when she was taken off the case. The statutory language requires a causal connection, not a temporal one.