عَلْقَمَةَ بْنَ وَقَّاصٍ اللَّيْثِيَّ، يَقُولُ: سَمِعْتُ عُمَرَ بْنَ الْخَطَّابِ رَضِيَ اللّٰهُ عَنْهُ عَلَى الْمِنْبَرِ، قَالَ: سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللّٰهُ عَلَيْهِ وَسَلَّم، يَقُولُ
إِنَّمَا الْأَعْمَالُ بِالنّيَّاتِ، وَإِنَّمَا لِكُلّ امْرِئٍ مَا نَوَى، فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى دُنْيَا يُصِيبُهَا أَوْ إِلَى امْرَأَةٍ يَنْكِحُهَا، فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ
Hazrat Umarra ibn al-Khattab stated, while he was on the pulpit, “I heard Allah’s Messengersa say, ‘Verily deeds are [judged] by intentions and for everyone is a reward, according to his intention. So, whoever emigrated for worldly benefits or for a woman to marry, his emigration [hijrah] was for what he emigrated for.’”
(Sahih al-Bukhari, Kitab Badi l-wahy, Bab kayfa kana bad’u l-wahy ila rasulillah, Hadith 1)