Sayyiduna Jabir (may Allah be pleased with him) reports: The Messenger of Allah (peace and blessings be upon him) said: “Whoever eats from these vegetables—namely garlic, onion, chives, and radish—should not come near our mosque, for the angels are harmed by that which harms human beings.”
Related hadith on this topic