Hadith 5451
Narrated `Abdul `Aziz: It was said to Anas "What did you hear the Prophet saying about garlic?" Anas replied, "Whoever has eaten (garlic) should not approach our mosque."
Hadith 5452
Narrated Jabir bin `Abdullah: The Prophet said, "Whoever has eaten garlic or onion should keep away from us (or should keep away from our mosque).'