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 (i.e., garlic), let him not come to our mosques at all."