Sahih Bukhari | Volume 7 | Hadith Number 363

Narrated by Jabir bin 'Abdullah
The Prophet said, "Whoever has eaten garlic or onion should keep away from us (or should keep away from our mosque)."