وعن أمير المؤمنين أبي حفص عمر بن الخطاب بن نفيل بن عبد العزى بن رياح بن قرط بن رزاح بن عدى بن لؤى ابن غالب القرشى العدوى‏.‏ رضي الله عنه، قال‏:‏ سمعت رسول الله صلى الله عليه وسلم يقول‏:‏ ‏"‏ إنما الأعمال بالنيات، وإنما لكل امرىء ما نوى فمن كانت هجرته إلى الله ورسوله فهجرته إلى الله ورسوله، ومن كانت هجرته لدنيا يصيبها، أو امرأة ينكحها فهجرته إلى ما هاجر إليه‏"‏ ‏(‏‏(‏متفق على صحته‏.‏ رواه إماما المحدثين‏: أبو عبدالله محمد بن إسماعيل بن إبراهيم بن المغيرة بن بَرْدِزْبَهْ الجعفي البخاري، أبو الحسين مسلم بن الحجاج بن مسلم القشيرى النيسابورى رضي الله عنهما في صحيحهما اللذين هما أصح الكتب المصنفة‏)‏‏)‏‏.‏
Copy
Abu Hurairah (May Allah be pleased with him) reported that

The Messenger of Allah (ﷺ) said: "The reward for Salat performed by a person in congregation is more than 20 times greater than that of the Salat performed in one's house or shop. When one performs Wudu' perfectly and then proceeds to the mosque with the sole intention of performing Salat, then for every step he takes towards the mosque, he is upgraded one degree in reward and one of his sins is eliminated until he enters the mosque, and when he enters the mosque, he is considered as performing Salat as long as it is the Salat which prevents him (from leaving the mosque); and the angels keep on supplicating Allah for him as long as he remains in his place of prayer. They say: 'O Allah! have mercy on him; O Allah! forgive his sins; O Allah! accept his repentance'. This will carry on as long as he does not pass wind".[Al-Bukhari and Muslim].