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."