Sahih Bukhari Volume 009, Book 092, Hadith Number 458.
Hadith Section/Book: Sahih Bukhari Sahih Bukhari Book 92. Holding Fast to the Qur'an and Sunnah
Narrated By Jabir bin Abdullah : The Prophet said, "Whoever has eaten garlic or onion, should keep away from us, or should keep away from our mosque and should stay at home." Ibn Wahb said, "Once a plate full of cooked vegetables was brought to the Prophet at Badr. Detecting a bad smell from it, he asked about the dish and was informed of the kinds of vegetables in contained. He then said, "Bring it near," and so it was brought near to one of his companions who was with him. When the Prophet saw it, he disliked eating it and said (to his companion), "Eat, for I talk in secret to ones whom you do not talk to."