SACRAMENTO, California—The gunman who killed his three daughters, a chaperone who was supervising his visit with the children, and himself in a Northern California church this week was in the United States illegally, immigration officials said Friday. David Mora, 39, was armed with what is often called a “ghost gun,” an unregistered, homemade semiautomatic rifle-style weapon. He had an illegal 30-round ammunition magazine and 17 bullets were fired, the Sacramento County Sheriff’s Office said. Mora was under a restraining order that barred him from possessing a firearm and authorities do not know how or when he obtained it. “The person who knows these answers is dead. I think I can safely say, he obtained it illegally,” sheriff’s spokesman Sgt. Rodney Grassmann said. Mora had been living at the Sacramento church where the killings occurred since he was released from an involuntary mental health hold in April 2021 after threatening to …