Hadith 194

Riyad as-Salihin

Book 17: The Book of the Prohibited actions

Chapter 311

Undesirability of Entering the Mosque after Eating raw Onion or Garlic

باب النهي من أكل ثومًا أو بصلا أو كراثًا أو غيره مما له رائحة كريهة عن دخول المسجد قبل زوال رائحته إلا لضرورة

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.[Muslim].