Hadith 192

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 1702
وعن أنس رضي الله عنه قال‏:‏ قال النبي صلى الله عليه وسلم ‏:‏ ‏ ‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏
"‏من أكل من هذه الشجرة، فلا يقربنا، ولا يصلين معنا‏"
Anas (May Allah be pleased with him) said:

The Prophet (ﷺ) said, "He who has eaten from this plant (i.e., garlic) should not approach us and should not offer Salat (prayer) along with us."[Al- Bukhari and Muslim].