The Book of Prayers (Kitab Al-Salat)
Muslim :: Book 4 : Hadith 1142
Ibn 'Umar reported: The Messenuer of Allah (may peace be upon him) said: He who eats of this (offensive) plant must not approach our mosque, till its odour dies: (plant signifies) garlic.