[Machine] On the authority of the Messenger of Allah ﷺ , he said: "I have heard the Messenger of Allah ﷺ say, 'Verily, actions are judged by intentions, and to each person is what he intends. So whoever migrates for the sake of Allah and His Messenger, his migration is for the sake of Allah and His Messenger. And whoever migrates for worldly gain or to marry a woman, his migration is for the sake of what he migrated for.'"
عَنْ رَسُولِ اللهِ ﷺ قَالَ سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ إِنَّمَا الْأَعْمَالُ بِالنِّيَّاتِ وَأَنَّ لِكُلِّ امْرِئٍ مَا نَوَى فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى اللهِ وَرَسُولِهِ فَهِجْرَتُهُ إِلَى اللهِ وَرَسُولِهِ وَمَنْ كَانَتْ هِجْرَتُهُ إِلَى دُنْيَا يُصِيبُهَا أَوْ إِلَى امْرَأَةٍ يَنْكِحُهَا فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ