Ibn `Umar (May Allah be pleased with them) said: The Prophet (PBUH) said, "He who has eaten garlic should not come to our mosque."[Al-Bukhari and Muslim]. The narration in Muslim is: "He who has eaten garlic should not come to our mosques."
311/1701 - Riyad Us-Saliheen (Gardens of the Righteous)