Hadith.1616 - He (Imam Jafar ibn Muhammad Al-Sadiq عليه السلام) was asked about a man who gave the Zakat of his wealth to someone he thought was needy, but later found out that the recipient was wealthy.
Imam عليه السلام replied: "It does not suffice for him (the obligation is not fulfilled)."