A former University of Minnesota employee has pleaded guilty to using school money to buy dozens of computers that he resold, possibly to fund his travel expenses and gambling habit.

Michael J. McDaniel, 34, of Lilydale, admitted in Hennepin County District Court last week to two counts of theft by swindle in the university case and to a theft by swindle charge involving items from a Target in an earlier case.

Under the plea agreement, McDaniel will have a 2¼-year term stayed while he is on probation for eight years. He also will serve one year in the county workhouse, although the judge may switch that to electronic home monitoring no later than six months into the sentence.

He also will have to pay restitution, to be determined at sentencing but likely to be roughly $134,000.

McDaniel is receiving treatment for a gambling problem and must abstain from gambling during his probation under the terms of the agreement.

McDaniel was accused of buying and reselling 78 computers from September 2017 to August 2018. He was working at the Center for Magnetic Resonance Research at the time. He was fired in November 2018.

More than $125,000 in profits from reselling about $134,000 worth of computers were deposited in McDaniel's bank account, according to the felony theft by swindle counts filed against him.

According to the criminal complaint:

A human resources official reported the thefts to campus police in October 2018. The purchases were identified by a finance staffer who noticed that McDaniel had purchased several computers through the U bookstores for his department that were not registered with the IT department.

Court records show that McDaniel was charged in December 2017 with buying iPads, returning empty boxes to six Target stores and depositing about $6,000 in his bank account.

Financial records showed that McDaniel was paying more than 12 loan companies for several credit cards and had made "substantial" cash withdrawals from Running Aces, Canterbury Park, Mystic Lake and near Treasure Island Casino.