Narrated Omar (bin Al Khattab): Allah’s Messenger, peace be upon him, said, “The reward of deeds depends upon the intention and every person will get the reward according to what he has intended.
So whoever emigrates for Allah and His Messenger then his emigration will be for Allah and His Messenger. And whoever emi-grates for worldly benefits or for a woman to marry her, his emigration will be for what he emigrated for.”
[I: 51 O.B. Sahih Al-Bukhari)
Narrated Abu Masood: The Prophet, peace be upon him, said, “If a man spends on his family with the intention of having a reward from Allah, sincerely for Allah’s sake, then it is a (kind of) alms-giving (in reward) for him.”
[I: 52 O.B. Sahih Al-Bukhari)