A B.C. man who hacked into the online accounts of pop star Carly Rae Jepsen and stole photos and videos was given a four-month conditional sentence today in Abbotsford, B.C.

Christopher Long, 25, pleaded guilty to mischief to data and possession of stolen property in May after admitting to accessing and taking sensitive information belonging to Jepsen.

The conditional sentence means Long will serve his four months as house arrest, but he will be allowed to go to work and school, as long as he does not violate the conditons of the sentence.

The judge added the conditions that Long can't go to Carly Rae Jepsen concerts, have any contact with her or her ex-boyfriend, and can not use a computer for anything other than work or school at anytime during the four-month sentence.

The case came to light last year when Jepsen's management team approached police with concerns about a person apparently harassing the pop star online.

Crown prosecutors told the court Long didn't know Jepsen, but was able to access an email account belonging to the singer and some of her social media accounts.

Before the sentencing, Jordi Ashworth, Jepsen's boyfriend at the time of the hacking, said Long should face jail time.

The Crown did ask for a sentence of four months of house arrest with exceptions so he can go to work, while the defence asked the court to consider a conditional discharge.

Jepsen, who grew up in Mission, B.C., soared to fame last summer with the catchy hit Call Me Maybe. The single topped the charts in Canada, the United States, Australia, Ireland and the United Kingdom.