Chapter: The eating of garlic or other (bad smelling vegetables).
Narrated `Abdul `Aziz:It was said to Anas "What did you hear the Prophet (ﷺ) saying about garlic?" Anas replied, "Whoever has eaten (garlic) should not approach our mosque."
Reference
Sahih al-Bukhari 5451
In-book reference
Book 70, Hadith 80
USC-MSA web (English)
Vol. 7, Book 65, Hadith 362
Translation by Dr. M. Muhsin Khan · Language: EN
Sahih
Arabic Text
حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا عَبْدُ الْوَارِثِ، عَنْ عَبْدِ الْعَزِيزِ، قَالَ قِيلَ لأَنَسٍ مَا سَمِعْتَ النَّبِيَّ صلى الله عليه وسلم فِي الثُّومِ فَقَالَ " مَنْ أَكَلَ فَلاَ يَقْرَبَنَّ مَسْجِدَنَا ".