Sahih Al Bukhari – Book of Merits Of The Helpers In Madinah (Ansaar)
Volumn 005, Book 058, Hadith Number 238.
—————————————–
Narated By 'Umar : I heard the Prophet saying, "The reward of deeds depends on the intentions, so whoever emigrated for the worldly benefits or to marry a woman, his emigration was for that for which he emigrated, but whoever emigrated for the Sake of Allah and His Apostle, his emigration is for Allah and His Apostle."