The Messenger of Allah (ﷺ) said: He who eats of this plant (garlic) should not approach…

Sahih Muslim Book 5 Hadith 89

Sahih Muslim #563

The Book of Mosques and Places of Prayer 5:89

Abu Huraira reported:

The Messenger of Allah (ﷺ) said: He who eats of this plant (garlic) should not approach our mosque and should not harm us with the odour of garlic.

Chapter: Prohibiting one who has eaten garlic, onions, or leeks, and other things that have an offensive odor from coming to the masjid, until that smell has gone away, and such a person should be expelled from the masjid

Grade: Sahih