Hadithcore
Riyad as-Salihin, 1703

Jabir (May Allah be pleased with him) said:

The Prophet (ﷺ) said, "He who has eaten garlic or onion should keep away from us or our mosques." <b>[Al-Bukhari and Muslim]</b>. The narration in Muslim is: "He who has eaten onion or garlic or leek should not approach our mosque, because the angels are also offended by the strong smells) that offend the children of Adam." <b>[Muslim]</b>.

وعن جابر رضي الله عنه قال‏:‏ قال النبي صلى الله عليه وسلم ‏:‏ ‏"‏من أكل ثومًا أو بصلا فليعتزلنا، أو فليعتزل مسجدنا‏"‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏ وفي رواية لمسلم‏:‏ ‏"‏من أكل البصل، والثوم، الكراث، فلا يقربن مسجدنا، فإن الملائكة تتأذى مما يتأذى منه بنو آدم‏"‏‏.‏

References1 variant
In-Book Reference
Book 17, Hadith 193
Sharh · explanationclick to expand
<b>Guidance from the Hadiths:</b><br> 1) It is prohibited to go to the mosque after eating garlic, onions, or the like of such plants that have a bad odor.<br> 2) Angels get annoyed by what annoys humans. So, a Muslim should be good-smelling, especially in places of worship and Muslim gatherings; most notable among them is prayer and learning classes.<br> Note:<br> It is permissible to eat onions and garlic. Yet, he who has eaten any of them should avoid going to the mosque to attend the congregational prayer. However, if he uses some substance that removes the bad odor, then he can go to the mosque. But it is not permissible for a person to intentionally eat onions or garlic to skip the congregational prayer in the mosque.
Related hadiths3
Compare isnād across 3 related chains →