Alqamah bin Waqas Laithi narrates that I heard Sayyiduna Umar bin Khattab (may Allah be pleased with him), he was saying that I heard the Messenger of Allah (peace and blessings be upon him) say that the acceptance of deeds depends upon the intention. Yahya bin Habib has added these words, "And indeed every person will get only that which he intended."