Hadithcore
Riyad as-Salihin, 1704

It has been narrated that 'Umar (May Allah be pleased with him) said in the sermon of Friday prayer:

"O you people! You eat garlic and onion. I think the odour of these to be very offensive. I saw that if the Messenger of Allah (ﷺ) happened to find a man with such offensive odour in the mosque, he would order him to be taken out of the mosque and sent to Al-Baqi'. He who wants to eat any of these, should cook them till their odour dies out. <b>[Muslim]</b>.

وعن عمر بن الخطاب رضي الله عنه أنه خطب يوم الجمعة فقال في خطبته‏:‏ ثم إنكم أيها الناس تأكلون شجرتين ما أراهما إلا خبيثتين‏:‏ البصل، والثوم -لقد رأيت رسول الله صلى الله عليه وسلم إذا وجد ريحهما من الرجل في المسجد أمر به، فأخرج إلى البقيع، فمن أكلهما، فليمتهما طبخًا‏.‏ ‏(‏‏(‏رواه مسلم‏)‏‏)‏‏.‏

References1 variant
In-Book Reference
Book 17, Hadith 194
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 hadiths7
Compare isnād across 7 related chains →