“I heard the Messenger of Allah
(ﷺ) say: ‘Actions are but by the intention and every man will
have
but that which he intended. So he whose emigration was for Allah
and
His Messenger, his emigration was for Allah and His Messenger.
But he
whose emigration was for some worldly benefit or to take some
woman in
marriage, his emigration was for that which he migrated.”
Sunan Ibn Majah Book 37, Hadith 128