Hazrat Umar bin Khattab (may Allah be pleased with him) narrated that the Prophet Muhammad (peace and blessings be upon him) said: Indeed, actions are judged by intentions, and every person will get what he intended. So, whoever migrates for Allah and His Messenger, then his migration is for Allah and His Messenger. And whoever migrates for worldly gain or to marry a woman, then his migration is for that for which he migrated.
Hadith Referenceاللؤلؤ والمرجان / كتاب الإمارة / 1245
Hadith Gradingمحدثین:«صحیح»
Hadith Takhrij«صحیح، أخرجه البخاري في: 83 كتاب الأيمان والنذور: 23 باب النية في الأيمان»