It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: Whoever enters our mosque to learn or teach goodness is like a warrior in the path of Allah, and whoever comes for any other purpose is like a person who looks at something he has no right to look at.