A customer was searched by bar staff after a complaint he had been taking drugs in the toilets.
Callum Blundell appeared to be putting something in the back of his pants and a wrap of drugs was found on the floor.
Blundell, 24, of Troutbeck Crescent, Mereside, pleaded guilty to possessing cocaine.
He was sentenced to a 13 weeks curfew on Saturdays from 6pm to 8am at Blackpool Magistrates’ Court.
Martine Connah, prosecuting, said a customer alleged Blundell had been taking drugs in the toilets of Bar 19 on April 18 about 3am. Blundell struggled as staff searched him.
Martin Hillson, defending, said his client had got a small amount of cocaine for his own use and had gone into the toilets to take some.