Sunan Abi Dawud, Book 27, Hadith 3816 (USC-MSA)

Narrated Abdullah ibn Umar: The Prophet said: He who eats from this plant should not come near the mosques.

حَدَّثَنَا أَحْمَدُ بْنُ حَنْبَلٍ، حَدَّثَنَا يَحْيَى، عَنْ عُبَيْدِ اللَّهِ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏ "‏ مَنْ أَكَلَ مِنْ هَذِهِ الشَّجَرَةِ فَلاَ يَقْرَبَنَّ الْمَسَاجِدَ ‏" ‏ ‏.‏

sunnah.com