Los Angeles, CA- For his third DUI, former teen idol David Cassidy will avoid jail and spend 90 days in an in-patient rehab facility instead, after pleading “no contest.”

In addition to intensive rehab, the former teen idol will serve 60 months’ probation,which is no walk in the park, pay various fines, and  attend a 9-month alcohol education program, the Los Angeles Times reported. If the gets in trouble again, meaning if he gets another DUI, Cassidy might have to trade his jeans in for a prison jumpsuit.

Cassidy was charged with his third DUI in January after he was stopped for making an illegal right turn. The arresting officer suspected he was intoxicated and a breathalyzer showed his blood alcohol content was 0.19. He was

In the aftermath of his third arrest, Cassidy’s agent Jo-Ann Geffen said the fading star was stressed out over his legal battles with Sony Picture over royalties he believed he is owed from his days on “The Partridge Family.” She said prior to his third arrest, Cassidy had completed rehab and was living a sober life. But he fell off the wagon in Los Angeles after giving a deposition.

“After attending his and his manager’s depositions, it appears as if the pressure led to a brief relapse,” Geffen told CNN.

Shortly after his third arrest, Cassidy’s wife Sue filed for divorce after 23 years, TMZ reported. She didn’t say whether his drinking problem influenced her decision to dissolve their marriage. She said this had been coming for a while; the couple had already been separated for a few months.

“This has been looming for some time.” But she adds, “I am truly heartbroken that our marriage is ending.”

Earlier this month, Cassidy came closer to resolving last year’s DUI charge from New York State. He was initially charged with felony DUI for this charge, but through negotiations he and his DUI attorney were able to have his DUI reduced to a misdemeanor, according to the Los Angeles Times. The details of a plea bargain are reportedly being worked out.

Cassidy’s first DUI arrest was in Ft. Lauderdale, his home town, in 2010. For that arrest he lost his driving privileges and was given one year probation.

His attorney Steven Graff said Cassidy has already spent 120 days in rehab, and plans to put in more time than the court ordered for his second stint. He will have a sober coach and intensive out-patient rehab to help him stay sober once he completes his in-patient rehab.

Whether Cassidy has learned his lesson and will stop driving under the influence remains to be seen. Let’s hope so since another arrest could mean jail time.

At least half of all people charged with a DUI will repeat the offense. It’s important for any DUI offender, whether it is their first or subsequent offense, to retain a DUI attorney to help them negotiate for reduced charges and avoid a jail sentence.