(17) باب نَهْىِ مَنْ أَكَلَ ثُومًا أَوْ بَصَلاً أَوْ كُرَّاثًا أَوْ نَحْوَهَا عَنْ حُضُورِ الْمَسْجِدِ
Ibn Juraij has narrated it with the same chain of transmitters:
He who eats of this plant, i. e. garlic, should not come to us in our mosque, and he made no mention of onions or leek.
Reference: Sahih Muslim 564 c
In-book reference: Book 5, Hadith 93
USC-MSA web (English) reference(deprecated numbering scheme): Book 4, Hadith 1148
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.