Hadith 191

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 1701
عن ابن عمر رضي الله عنه أن النبي صلى الله عليه وسلم قال‏:‏ ‏"‏من أكل من هذه الشجرة -يعني الثوم- فلا يقربن مسجدنا‏"‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏ وفي رواية لمسلم‏:‏ ‏"‏مساجدنا‏"‏‏.‏
Ibn 'Umar (May Allah be pleased with them) said:

The Prophet (ﷺ) said, "He who has eaten garlic should not come to our mosque."[Al-Bukhari and Muslim].The narration in Muslim is: "He who has eaten garlic should not come to our mosques."