(17) باب نَهْىِ مَنْ أَكَلَ ثُومًا أَوْ بَصَلاً أَوْ كُرَّاثًا أَوْ نَحْوَهَا عَنْ حُضُورِ الْمَسْجِدِ
Ibn 'Umar reported:
The Messenger of Allah (ﷺ) said: He who eats of this (offensive) plant must not approach our mosque, till its odor dies: (plant signifies) garlic.
Reference: Sahih Muslim 561 b
In-book reference: Book 5, Hadith 87
USC-MSA web (English) reference(deprecated numbering scheme): Book 4, Hadith 1142
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.