It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said during the battle of Khaybar: Whoever eats this plant, meaning the garlic plant, should not come to the mosque.