The Book of Prayers (Kitab Al-Salat)

Muslim :: Book 4 : Hadith 1141

Ibn 'Umar reported: The Messenger of Allah (may peace be upon him) said during the battle of Khaybar: He who ate of this plant, i. e. garlic, should not come to the mosques. In the narration of Zubair, there is only a mention of" battle" and not of Khaybar.

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