Sir John Thomas sitting at the High Court ruled that the two men were in breach of the injunction and therefore in contempt of court.
Reflecting on the "gravity" of their offence he said they would be given nine months imprisonment but because of mitigating circumstances it would be suspended.
More top news
Doctors say they believe dementia patients are being failed by health and social care services.
New figures show people aged over 55 could be as much as four times more likely to become victims of a telephone scam .
The fallout of Greece's decision to reject the terms of an international bailout will have repercussions for the rest of Europe.