A police prosecutor who admitted on Thursday to three drugs charges posted videos of himself using methamphetamine online.
Brent Thomson, 49, has pleaded guilty at the Waitakere District Court to using and possessing methamphetamine and using cannabis.
Two blogs posted by Brent Thomson describe him using the drugs at what the Crown describes as sexual parties in April and May this year.
Thomson also posted two videos on the same website which show him injecting himself.
During a search of Thomson's house the police found a small amount of methamphetamine and numerous syringes.
Thomson's lawyer, Mark Manhire, told the court he will ask for a discharge without conviction.
Police say Mr Thomson has been stood down and will face an employment investigation. He will be sentenced next year on 15 January.