Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Whoever enters this mosque of ours to learn something good or to teach it is like a Mujahid in the path of Allah, and whoever enters it for any other purpose is like one gazing at something that does not belong to him."

Ahmad 8603

Daif

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

عن أبي هريرة

عن رسول الله ﷺ قال من دخل مسجدنا هذا ليتعلم خيرا أو ليعلمه كان كالمجاهد في سبيل الله ومن دخله لغير ذلك كان كالناظر إلى ما ليس له

أحمد 8603ضعيف
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 8603
Ahmad 8603