Ashley Boyd, from Moodiesburn, Lanarkshire, gained access to Kevin O’Connor’s Facebook and Twitter accounts and posted messages and slurs about his wife Rhona.
The 26-year-old also sent a series of messages to Mr O’Connor’s friends and colleagues saying he was in an “unhappy marriage” and changed his relationship status to single.
Glasgow Sherrif Court was told that Mrs O’Connor became friends with Boyd when they worked in Boots together, although by the end of 2013 the friendship had deteriorated, according to the Sun.
In 2014 while serving Mr O’Connor in the shop, Boyd told him she knew his wife and suggested that a number of women in the shop “fancied” him.
She later quit Boots to join the police force in Scotland but signed up to the same gym as Mr O’Connor, apparently knowing he would be there.
Andrew Beadsworth, the prosecutor for the case, said: Boyd was “fixated upon Kevin O’Connor.”
“Mr O’Connor was concerned and angry. Efforts made by him to delete the Facebook account were unsuccessful because Boyd had changed the password,” he added, according to the Daily Record.
He also received a text from a colleague asking about a conversation she had with him about his “unhappy marriage”.
As Boyd started to come under suspicion, she managed to persuade a friend of hers to own up to hacking the social media accounts. This friend later confessed to the deception and revealed Boyd’s role in the incident.
Boyd pleaded guilty and admitted to “engaging in a course of conduct which caused Rhona and Kevin O’Connor fear and alarm” by stalking.
She has been bailed and will be sentenced next month.