Sayyiduna Anas bin Malik (may Allah be pleased with him) narrates that the Prophet (peace and blessings be upon him) said: "Whoever eats from these two plants, garlic and onion, must not come near our place of prayer; and when he comes to me, I will wipe his face and recite words of protection over him."
Abu Ya'la recorded it; its chain contains Sallam bin Abi Khubzah, and he is extremely da'if (weak).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 1991