Selective amidation by a photocatalyzed umpolung reaction.