Sayyiduna Abu Bakr al-Siddiq (may Allah be pleased with him) narrates: When the Prophet (peace and blessings be upon him) conquered Khaybar, the people came upon garlic and began eating it. The Prophet (peace and blessings be upon him) said: "Whoever eats this foul-smelling vegetable must not come near our mosque (or our designated place of prayer)."
Al-Tabarani recorded it in al-Mu'jam al-Awsat as a narration of Abu al-Qasim, the freed slave of Sayyiduna Abu Bakr (may Allah be pleased with him). I have not found anyone who mentioned this man, and the remaining narrators of this report have been declared trustworthy.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 1993