Ex-Disney actor Stoney Westmoreland has been sentenced to two years in prison for attempting to persuade a minor to have sex.

TMZ reports that the 52-year-old accepted a deal, pleading guilty to using interstate facilities to transmit information about a minor. He will have 10 years of supervised release following jail time and is required to comply with DNA collection and must register as a sex offender. Additionally, his computer devices will be randomly searched and he has to inform authorities of all of his electronic accounts, like email and social media. He is also not permitted to be in contact with people who are under 18 years old unless an adult is present.

Westmoreland’s lawyer, Wendy Lewis, told the outlet that the actor was initially hit with a charge of enticement of a minor over the internet, which could have had him locked up for up to 10 years. 

Back in December 2018, the former Andi Mack star was arrested in Salt Lake City for allegedly plotting sex with a minor. According to authorities, Westmoreland used the dating app, Grindr, to meet with a 13-year-old, with whom he shared explicit photos. However, Westmoreland was actually speaking with an undercover officer who was pretending to be a minor. 

Disney fired Westmoreland following his arrest. The company issued a statement following his dismissal.

“Stoney Westmoreland, an actor working on the series Andi Mack, was arrested in Salt Lake City today,” a rep for Disney Channel said in 2018. “Given the nature of the charges and our responsibility for the welfare of employed minors, we have released him from his recurring role and he will not be returning to work on the series which wraps production on its third season next week.” 

Westmoreland played Ham, Andi Mack’s grandfather, and appeared in 39 episodes across three seasons.