U.S. president Donald Trump arrives at Trump International Golf Links on June 25, 2016 in Aberdeen, Scotland | Jeff J Mitchell/Getty Images Walker loses Trump golf course urination case Trump organization warned about ‘very real risk of prosecution’ if staff continue photographing ‘females urinating in the countryside.’

A judge on Wednesday rejected a claim that staff at Donald Trump's Scottish golf course broke data privacy laws when they photographed a woman urinating in sand dunes.

Rohan Beyts, a retired social worker and keen walker, had been seeking £3,000 in damages, claiming Trump staff broke the law by taking photographs of her on their mobile phones, the Guardian reported. A judge at the small claims court in Edinburgh rejected Beyts' claim and ordered her to pay £300 in costs, but said she was within her legal rights to complain and had "a reasonable expectation of privacy."

He said Beyts had lost the case because her lawyer failed to prove that she was distressed as a direct result of Trump International Golf Course Scotland not being registered at the time under the U.K.’s data protection laws.

The judge also criticized the U.S. president's organization, saying "officious bystanders who photograph females urinating in the countryside put themselves at very real risk of prosecution."

A lawyer representing the Aberdeenshire course said an employee had used his mobile phone to photograph Beyts as he believed she was guilty of a criminal offense.

“It was reasonable, proportionate and fair under the circumstances for employees to consider a crime was being committed and to take a photograph of that act,” the Trump organization's lawyer told the court.