It is narrated from Sayyiduna Bara' bin Azib and Sayyiduna Zayd bin Arqam (may Allah be pleased with them both); they said: We were with the Messenger of Allah (peace and blessings be upon him) on the day of Ghadir Khumm, and we were lifting a branch of a tree away from his (peace and blessings be upon him) head, when he (peace and blessings be upon him) said: "Charity is not lawful for me nor for my Ahl al-Bayt. May Allah curse whoever attributes himself to someone other than his father, and may Allah curse whoever takes as patrons (wala') others than his own freeing patrons. The child belongs to the owner of the bed (the husband), and for the fornicator is the stone. And there is no bequest for an heir."
Hadith Referenceالمعجم الكبير للطبراني / باب الزاي / 5038