Stormy Daniels has had her hush-money settlement lawsuit against Trump dismissed. [Photo, Courtesy]

Porn star Stormy Daniels has had her hush-money settlement lawsuit against Donald Trump dismissed by a federal judge.

The adult-film actress, whose real name is Stephanie Clifford, filed the action a year ago to end a non-disclosure agreement that kept her discussing an alleged affair in 2006.

The US President has always denied having the relationship with Daniels but his former lawyer Michael Cohen has said the agreement was struck to help Trump capture the White House.

U.S. District Judge James Otero in Los Angeles today dismissed the lawsuit because Trump and Cohen have agreed not to enforce the NDA against Daniels, court documents showed.

Tweeting after the ruling was made public, Daniels said: "More than a year ago when I was being threatened with a 20 million lawsuit, I asked a judge to toss out this illegal NDA.

President Donald Trump. [Photo, Courtesy]

"Glad I stood my ground and kept fighting."

The nondisclosure agreement did not prevent Daniels from speaking to news media, including CBS' "60 Minutes," or releasing a memoir, "Full Disclosure."

The ruling was made the same day that Trump's ex-campaign chief Paul Manafort was sentenced to 47 months in prison for fraud .

The 69-year-old is also awaiting sentencing for different charges next week.