(CNN) -- The man who sent dozens of strange text messages to Lindsay Lohan and left chocolates at her house has been ordered to stay away from the actress.
A judge granted Lohan a temporary restraining order on Thursday, according to the Los Angeles County Superior Court. It prohibits 38-year-old A. David Cocordan from attempting to meet or contact the actress.
Another hearing will be held on June 8 to determine if a permanent restraining order will be issued, the court said.
Lohan must report to jail by June 17 to begin serving a 120-day sentence for a necklace theft charge. She received the sentence after her lawyer entered a no-contest plea -- equivalent to a guilty plea -- to a misdemeanor theft charge on May 11.
"I am glad to be able to put this past me and move on with my life and my career," Lohan said in a statement released at the May 11 sentencing hearing.
Lohan recently completed community service for violating her probation in a 2007 drunken-driving case.