Jabir bin Abdullah reported,

The Prophet ﷺ prohibited eating onions and leeks during the time of Khaybar. Some people ate them anyway and then came to the mosque. The Prophet ﷺ asked, "Did I not forbid these two foul-smelling plants?"They replied, "Yes, Messenger of Allah, but hunger overwhelmed us."The Messenger of Allah ﷺ said, "Whoever eats them should not come to our mosque, for the angels are bothered by what bothers the children of Adam."

Ahmad 15159

Sahih

حدثنا الخزاعي أخبرنا حماد بن سلمة أخبرنا أبو الزبير

عن جابر

أن النبي ﷺ نهى زمن خيبر عن البصل والكراث فأكلهما قوم ثم جاءوا إلى المسجد فقال النبي ﷺ ألم أنه عن هاتين الشجرتين المنتنتين قالوا بلى يا رسول الله ولكن أجهدنا الجوع فقال رسول الله ﷺ من أكلهما فلا يحضر مسجدنا فإن الملائكة تتأذى مما يتأذى منه بنو آدم

أحمد 15159صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Jabir bin Abdullah
Numbering
Darussalam 15159
Ahmad 15159