A WETHERBY man attacked a police officer twice after a break-up with his girlfriend.
Ben Fulford, 22, of Calder Close, pleaded guilty to assaulting PC Stephen Peachman in a Harrogate pub on September 23 and at the town's police station minutes later.
Prosecutor Steven Ovenden said police had been called to a town centre bar after Fulford had to be restrained by door staff.
He hit PC Peachman.Fulford was arrested and when he arrived at the police station, he struck PC Peachman again and kneed him in his groin. Fulford pleaded guilty to two counts of assault on a police officer.
He also admitted resisting arrest after a domestic incident a fortnight earlier. In mitigation Andrew Tinning said breaking up with his girlfriend led Fulford to seek comfort in drink.
Fulford was given an 18-month community order to attend Harrogate Alcohol and Drugs Agency and a 9pm to 7am curfew for six months.