Sayyiduna Abu Hurairah (may Allah be pleased with him) narrates: He heard the Prophet Muhammad (peace and blessings be upon him) saying: "Whoever comes to our mosque to acquire or teach knowledge of goodness, he is like one who strives in the way of Allah. And whoever comes for any other reason, his example is like that of a person who keeps an eye on something that does not belong to him."