Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:5049[Chain 1] Abū ʿAlī al-Rūdhbārī > Muḥammad b. Bakr > Abū Dāwud > Aḥmad b. Ḥanbal > Yaḥyá [Chain 2] Abū ʿAbdullāh al-Ḥāfiẓ > Abū Bakr Aḥmad b. Isḥāq Imlāʾ > Abū al-Muthanná And Muḥammad b. Ayyūb Wa-al-Ḥadīth Liʾabī al-Muthanná > Musaddad > Yaḥyá > ʿUbaydullāh [Chain 3] Abū ʿAbdullāh > Muḥammad b. ʿUmar > Aḥmad b. Salamah > Muḥammad b. Bashhār And Muḥammad b. al-Muthanná > Yaḥyá b. Saʿīd > ʿUbaydullāh > Nāfiʿ > Ibn ʿUmar

[Machine] The messenger of Allah ﷺ said about the Battle of Khaybar, "Whoever eats from this tree, let him not approach our mosques." This is the wording of the hadith from Muhammad ibn Bashshar and Ibn al-Muthanna. In the hadith of Ahmad, it is stated, "Let him not come near the mosques." There is no mention of the Battle of Khaybar in this hadith, and it is the wording of Musaddad. He added, "meaning garlic," and said, "So let him not come to our mosque."  

البيهقي:٥٠٤٩أَخْبَرَنَا أَبُو عَلِيٍّ الرُّوذْبَارِيُّ أنبأ مُحَمَّدُ بْنُ بَكْرٍ ثنا أَبُو دَاوُدَ ثنا أَحْمَدُ بْنُ حَنْبَلٍ ثنا يَحْيَى ح وَأَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ ثنا أَبُو بَكْرٍ أَحْمَدُ بْنُ إِسْحَاقَ إِمْلَاءً أنبأ أَبُو الْمُثَنَّى وَمُحَمَّدُ بْنُ أَيُّوبَ وَالْحَدِيثُ لِأَبِي الْمُثَنَّى ثنا مُسَدَّدٌ ثنا يَحْيَى عَنْ عُبَيْدِ اللهِ ح وَأَخْبَرَنَا أَبُو عَبْدِ اللهِ أنبأ مُحَمَّدُ بْنُ عُمَرَ ثنا أَحْمَدُ بْنُ سَلَمَةَ ثنا مُحَمَّدُ بْنُ بَشَّارٍ وَمُحَمَّدُ بْنُ الْمُثَنَّى قَالَا ثنا يَحْيَى بْنُ سَعِيدٍ ثنا عُبَيْدُ اللهِ أَخْبَرَنِي نَافِعٌ عَنِ ابْنِ عُمَرَ

أَنَّ رَسُولَ اللهِ ﷺ قَالَ فِي غَزْوَةِ خَيْبَرَ مَنْ أَكَلَ مِنْ هَذِهِ الشَّجَرَةِ فَلَا يَأْتِيَنَّ الْمَسَاجِدَ هَذَا لَفْظُ حَدِيثِ مُحَمَّدِ بْنِ بَشَّارٍ وَابْنِ الْمُثَنَّى وَفِي حَدِيثِ أَحْمَدَ فَلَا يَقْرَبَنَّ الْمَسَاجِدَ وَلَيْسَ فِيهِ فِي غَزْوَةِ خَيْبَرَ وَهُوَ فِي حَدِيثِ مُسَدَّدٍ وَزَادَ يَعْنِي الثُّومَ وَقَالَ فَلَا يَأْتِ مَسْجِدَنَا  

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنْ مُسَدَّدٍ وَرَوَاهُ مُسْلِمٌ عَنْ مُحَمَّدِ بْنِ الْمُثَنَّى