Hadith No. 2 529
Narrated `Umar bin Al-Khattab:The Prophet (ﷺ) said, "The (reward of) deeds depend on intentions, and every person will get the reward according to what he intends. So, whoever migrated for Allah and His Apostle, then his migration will be for Allah and His Apostle, and whoever migrated for worldly benefits or for marrying a woman, then his migration will be for what he migrated for." (See Hadith No. 1, Vol)
Translations
FR — Rapporté par `Umar bin Al-Khattab : Le Prophète (ﷺ) a dit : « La valeur des actes dépend des intentions, et chaque personne sera récompensée selon son intention. Ainsi, celui qui a émigré pour Allah et Son Messager, son émigration sera pour Allah et Son Messager. Mais celui qui a émigré pour obtenir des biens matériels ou pour épouser une femme, son émigration sera pour ce pour quoi il a émigré. »