A chef who was caught supplying cannabis to his flatmates started smoking the drug as he struggled to cope with the break-up of his parents' marriage, a court heard.
Stephen Lynch (23) began using cannabis when he was studying for his Leaving Certificate and he ended up as a "chronic cannabis user".
He is now clean and is providing clean urine samples, his solicitor Danny Nolan told a court.
The matter was before Swords District Court for sentencing after a judge ordered a probation report.
Judge John Coughlan fined Lynch €500 and imposed an eight-month sentence, suspended for eight months.
The defendant, with an address at Applewood Square in Swords, had admitted to possession of cannabis for sale or supply on October 14, 2014.
The street value of the cannabis was €1,100.
Garda David Smith had said that he obtained a search warrant and searched the house Lynch was renting with friends and found the cannabis.
The court heard that Lynch admitted to gardai that he was supplying the cannabis to his flatmates.
The court also heard that the defendant has never been in trouble before.
Defence solicitor Danny Nolan said Lynch was a "chronic cannabis user".
Mr Nolan said the defendant's problem with the drug began when he was studying for his Leaving Certificate.
The solicitor said Lynch turned to cannabis when his parents divorced.
"He couldn't cope with the break-up of his parents' marriage," Mr Nolan told the court.
Mr Nolan also said that Lynch was only supplying the drug to his flatmates, and that it was not a sophisticated operation.
He said Lynch is working as a chef, and is clean from drugs and providing clean urine samples to the probation services.
Imposing an eight-month suspended sentence, Judge Coughlan told Lynch that he had been given a chance, and warned him he faced going to jail if he came before the courts again during the period of suspension.