صحیح ابن حبان
Ibn Hibban
كتاب السير
Book of Expeditions
باب الهجرة - ذكر البيان بأن كل من هاجر إلى المصطفى صلى الله عليه وسلم ومن قصده نوال شيء من هذه الفانية-
Chapter on Migration – Clarifying that whoever migrated to the Prophet or sought worldly gain through migration.
1 hadith
Hadith 4868
Sayyiduna Umar bin Khattab (may Allah be pleased with him) narrates: The Noble Prophet (peace and blessings of Allah be upon him) said: "The reward of deeds depends upon the intentions. A person will get only what he intended. Whoever migrated for Allah and His Messenger, his migration will be counted for Allah and His Messenger. And whoever migrated for some worldly benefit or to marry a woman, his migration will be counted towards that for which he migrated."