[Machine] I heard the Messenger of Allah ﷺ say: "Actions are judged by intentions, and each person will be rewarded according to what they intended. So whoever emigrates for the sake of Allah and His Messenger, their emigration will be for Allah and His Messenger. And whoever emigrates for worldly gains or to marry a woman, their emigration will be for what they emigrated for."
سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ إِنَّمَا الْأَعْمَالُ بِالنِّيَّاتِ وَإِنَّمَا لِكُلِّ امْرِئٍ مَا نَوَى؛ فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى اللهِ وَإِلَى رَسُولِهِ فَهِجْرَتُهُ إِلَى اللهِ وَإِلَى رَسُولِهِ وَمَنْ كَانَتْ هِجْرَتُهُ إِلَى دُنْيَا يُصِيبُهَا أَوْ إِلَى امْرَأَةٍ يَتَزَوَّجُهَا فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ