"How I Met Your Mother" star Alyson Hannigan has been granted a restraining order against a man who allegedly threatened her online.
 
The actress requested a protection order against John Hobbs, who she claims has been harassing her on several social networking sites.
 
Hannigan's lawyers claim that Hobbs is "mentally unstable and was recently discharged from a mental hospital." The restraining order also protects her actor husband Alexis Denisof and their daughters, Satyana and Keeva Jane.
 
A hearing has been set for March 6 to decided whether the order will be made permanent.