The Book of Prayers (Kitab Al-Salat)

Muslim :: Book 4 : Hadith 1145

Jabir reported: The Messenger of Allah (may peace be upon him) forbade eating of onions and leek. When we were overpowered by a desire (to eat) we ate them. Upon this he (the Holy Prophet) said: He who eats of this offensive plant must not approach our mosque, for the angels are harmed by the same things as men.

Source materials are from the University of Southern California MSA site
Hadith eBooks converted from Imaan Star