Former News of the World editor Andy Coulson was still on the News Corp. payroll after he began working as the main media adviser for David Cameron in July 2007, the BBC's Robert Peston reports. The payments, totaling "several hundred thousand pounds," were part of Coulson's severance package and came in installments through the end of 2007. That means Coulson had financial ties to Rupert Murdoch's company even as he was working for the Tories, though "a senior member of the government" told Peston the party didn't know of the link. Coulson was arrested in connection with the New of the World phone hacking scandal in July; Cameron, now the British prime minister, has had to defend his decision to hire him.

Peston explains the timeline:
As I understand it, after Mr Coulson resigned from News International on 26 January 2007, News International said it would pay him his full entitlement under his two-year contract as editor of the News of the World - although the money would be paid in instalments.
 
I am told that Mr Coulson also continued to receive his News International work benefits, such as healthcare, for three years, and he kept his company car.
 
Mr Coulson was appointed as the Conservative Party's Director of Communications on 31 May 2007 and took up the post in July of that year. He was reportedly paid £275,000 a year by the Conservative Party.
 
In May 2010, after the Tories formed a coalition government with the Liberal Democrats, Mr Coulson became Director of Communications for the government. In January of this year, he resigned from that post, following disclosures that criminal activity at the News of the World may have been more widespread than News International had been saying.