Hadith:
Narrated by Umar ibn al-Khattab:
The Messenger of Allah, peace and blessings be upon him, said:
Verily, deeds are only with intentions. Verily, every person will have only what they intended. Whoever emigrated to Allah and his messenger, his emigration is for Allah and his messenger. Whoever emigrated to get something in the world or to marry a woman, his emigration is for that to which he emigrated.
Source: Sahih Al-Bukhari 54