Sahih Bukhari | Volume 1 | Hadith Number 815

Narrated by 'Abdul 'Aziz
A man asked Anas, "What did you hear from the Prophet about garlic?" He said, "The Prophet said, 'Whoever has eaten this plant should neither come near us nor pray with us."