On the authority of Abu Hurayrah (may Allah be pleased with him), in the hadith of the man who prayed badly: he came and prayed, then came to the Prophet (peace and blessings be upon him) and greeted him. He returned the greeting and said, “Go back and pray, for you have not prayed.” So he went back and prayed, then came and greeted the Prophet (peace and blessings be upon him) — until he did that three times. Agreed upon.