A human resources department employee takes home employee data that is then stolen by her boyfriend.

A Peabody, MA man will spend seven years in federal prison for leading an identity fraud ring that cost retailers nearly $400,000, federal prosecutors said.

William Dodge, 46, will have to pay back $375,000 in restitution to some of the nation’s largest retail chains when he’s released from prison, the United States Attorney’s office said in a press release announcing the sentence last week.

Dodge was dating a woman who worked in the human resources department at a Florida company, prosecutors revealed in court documents last year.

She told investigators that she sometimes brought work home with her; Dodge claimed to have paid her $3,000 for the information, court papers said. Dodge obtained the personal information of 49 employees, including birth dates and Social Security numbers.

He then recruited at least five others in 30 states to pose as the employees, using their personal information to create fake driver’s licenses, which were then used to both access and open lines of credit at retailers, including J.C. Penney, Best Buy, The Home Depot, Lowe’s, Kohl’s, Macy’s and T.J. Maxx.

The accomplices or Dodge himself would pose as a customer who had forgotten his or her store card and ask the cashier to look up the account using the phony license. If a customer had an account with the retailer, the items would be purchased on that account. If the customer did not, then a store account would be opened in their name.

The items were later “fenced” or resold, and Dodge would keep half the proceeds.

Dodge and his girlfriend were arrested by Peabody police in 2012 after using fake licenses to purchase items at Sephora in Northshore Mall.

In addition to aggravated identity theft, Dodge pleaded guilty last May to credit card fraud and conspiracy to commit credit card fraud.