“Glee” alum Mark Salling appeared in court after taking responsibility for his actions in a child porn case

Actor Mark Salling, left, who starred on the musical dramedy "Glee," leaves federal court in Los Angeles after pleading not guilty to federal pornography charges Friday, June 3, 2016, and had his internet usage and travel severely restricted. U.S. Magistrate Judge Rozella A. Oliver ruled Salling can be released after he posts $150,000 bail, including $100,000 of his own money to guarantee future court appearances. (AP Photo/Nicole Evatt)

Mark Salling seems to be taking responsibility for his actions.

Videos by Rare

The former “Glee” actor reportedly appeared in court on Monday after taking a plea deal earlier this year. Salling pleaded guilty to possession of child pornography, according to E! News. He will face sentencing in March and is currently out on bail.

In October, Salling decided to take the plea deal and will serve four to seven years in prison, followed by a supervised release for 20 years. He must also register as a sex offender and pay restitution to each victim. He has reportedly agreed to pay upward of $50,000 to each victim that has requested compensation.

RELATED: Before taking a plea deal, “Glee” alum Mark Salling reportedly tried to take his own life

“Mark is focused on accepting responsibility and atoning for his conduct,” his attorney, Michael Proctor, told E! News in a statement.

Salling was originally arrested in December 2015 after police were tipped off and found the child pornography in his home.

His ex-girlfriend and former “Glee” co-star Naya Rivera wrote in her tell-all, “Sorry Not Sorry: Dreams, Mistakes and Growing Up,” that she wasn’t too surprised when she heard the news.

“My son’s nanny actually told me about it when the story broke,” she wrote. “I can’t say I was totally shocked, but still — WTF? Then I had no doubt that God really did have my back along the way. When Mark dumped me, I thought it was the worst thing ever, but can you imagine if that didn’t happen? And I was laying there in bed when the battering ram came through the door?”

She claimed they kept their three-year relationship a secret at the urging of Salling’s publicist.

What do you think?

A designer dropped a huge hint at what Meghan Markle might wear for her walk down the aisle

This Ohio megachurch stole from a mentally ill Chicago woman