Sahih Muslim | Book 5 | Chapter 28

Narrated by Abu Huraira
Abu Huraira reported that the Apostle of Allah (may peace be upon him) had said: Seven are (the persons) whom Allah would give protection with His Shade on the Day when there would be no shade but that of Him (i.e. on the Day of Judgment, and they are): a just ruler, a youth who grew up with the worship of Allah; a person whose heart is attached to the mosques; two persons who love and meet each other and depart from each other for the sake of Allah; a man whom a beautiful woman of high rank seduces (for illicit relation), but he (rejects this offer by saying): "I fear Allah" ; a person who gives charity and conceals it (to such an extent) that the right hand does not know what the left has given: and a person who remembered Allah in privacy and his eyes shed tears.

Narrated by Abu Huraira
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.