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.
muslim:1031bYaḥyá b. Yaḥyá > Mālik > Khubayb b. ʿAbd al-Raḥman > Ḥafṣ b. ʿĀṣim > Abū Saʿīd al-Khudrī or > Abū Hurayrah

This hadith has been narrated, on the authority, of Abu Huraira (with this change of words)." A person whose heart is attached to the mosque when he goes out of it till he returns to it."  

مسلم:١٠٣١bوَحَدَّثَنَا يَحْيَى بْنُ يَحْيَى قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ خُبَيْبِ بْنِ عَبْدِ الرَّحْمَنِ عَنْ حَفْصِ بْنِ عَاصِمٍ عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ أَوْ عَنْ أَبِي هُرَيْرَةَ

أَنَّهُ قَالَ قَالَ رَسُولُ اللَّهِ ﷺ بِمِثْلِ حَدِيثِ عُبَيْدِ اللَّهِ وَقَالَ وَرَجُلٌ مُعَلَّقٌ بِالْمَسْجِدِ إِذَا خَرَجَ مِنْهُ حَتَّى يَعُودَ إِلَيْهِ