SACRAMENTO (CBS13) — James Hooker was sentenced after he avoided trial by pleading no contest to having oral sex in 1998 with a then-17-year-old girl.

Prosecutors and the victim say the main goal of the case was to force James Hooker to register as a sex offender.

READ MORE: Sacramento County Tackles Zip Code Vaccine Disparities

With high-profile attorney Gloria Allred by her side, the victim in the sex crimes case from 15 years ago revealed her identity as Michelle Miller.

While Miller didn’t speak with reporters, Allred says forcing Hooker to register as a sex offender for life was a must for the victim.

“Other children will now receive a measure of protection, and Mr. Hooker will now be recognized as the predator that he is.”

A plea deal took jail time off the table and reduced the felony charge of having oral sex with a minor to a misdemeanor.

READ MORE: Feds' Boogaloo Indictment Details Inside of Northern California Extremist Group

Miller kept quiet about the student-teacher love affair until she spotted a news story about Hooker and his new teenage girlfriend.

Hooker threw himself in the national spotlight after leaving his wife and children for his then-student, 18-year-old Jordan Powers.

The couple and their legal team didn’t comment after today’s hearing.

Inside court, his attorney asked the judge to throw out the sex offender registry requirement, but the judge denied the request.

Prosecutors were pleased the case was resolved before this week’s scheduled trial.

MORE NEWS: Stockton Teen, 14, Shot While Driving Left Paralyzed

Hooker has been sentenced to three years probation and because he’s only charged with a misdemeanor, his picture may not appear on the Megan’s Law website. He will still be forced to register and stay away from girls age 12-18.