Sayyiduna Abu Tha'labah al-Khushani (may Allah be pleased with him) narrates: We went on a military expedition with the Messenger of Allah (peace and blessings be upon him), and we came upon some domestic donkeys; we slaughtered them and cooked them. The Messenger of Allah (peace and blessings be upon him) was informed of this, so he ordered a caller, and he announced among the people: "The meat of domestic donkeys is not lawful; the Messenger of Allah (peace and blessings be upon him) has made it unlawful." And the people found onions and garlic within the walls of those orchards; they were hungry, so they ate from it. Then they came (to the mosque) in the evening, and the smell of onions and garlic spread through the mosque. So the Messenger of Allah (peace and blessings be upon him) said: "Whoever eats of this disagreeable plant, let him not come near us in our mosque."
Hadith Referenceالمعجم الأوسط / باب الحاء / 3512
Hadith Takhrij«أخرجه البخاري فى «صحيحه» برقم: 5527، 5530، 5780، ومسلم فى «صحيحه» برقم: 1932، 1936، ومالك فى «الموطأ» برقم: 1821 / 481، وابن الجارود فى «المنتقى» برقم: 957، وابن حبان فى «صحيحه» برقم: 4846، 5279، والنسائي فى «المجتبى» برقم: 4337 / 3، 4336 / 2، 4352 / 8، 4353 / 9، 4450 / 1، والنسائي فى «السنن الكبرى» برقم: 4512، 4819، 4818، 4834، 4835، 6613، وأبو داود فى «سننه» برقم: 3802، والترمذي فى «جامعه» برقم: 1477، 1477 (م)، والدارمي فى «مسنده» برقم: 2023، 2024، وابن ماجه فى «سننه» برقم: 3232، والبيهقي فى «السنن الكبرى» برقم: 19412، 19413، 19414، 19522، 19523، 19547، وأحمد فى «مسنده» برقم: 18012، 18015، 18016، 18017، 18018، 18023، 18024، 18019، والطيالسي فى «مسنده» برقم: 1109، والحميدي فى «مسنده» برقم: 899، وعبد الرزاق فى «مصنفه» برقم: 8704، وابن أبي شيبة فى «مصنفه» برقم: 20225، والطحاوي فى «شرح معاني الآثار» برقم: 6295، 6398، 6405، والطحاوي فى «شرح مشكل الآثار» برقم: 3481، 3480، 3484، 3486، والطبراني فى «الكبير» برقم: 550، 551، 548، 549، 552، 553، 556، 554، 555، 558، 557، 559، 561، 560، 564، 562، 563، 565، 566، 569، 574، 577، 583، 582، 585، والطبراني فى «الصغير» برقم: 421، والطبراني فى «الأوسط» برقم: 67، 8576، 9207»