It was narrated from Ibn 'Abbas (رضي الله عنه) that a man came to Umar and said:
A woman came to buy something, and I took her into a closet and did something that was less than intercourse. He said: Woe to you! Perhaps she is the wife of someone who is away (fighting in jihad) for the sake of Allah? He said: Yes, He said: Go to Abu Bakr and ask him. So he went to him and asked him, and he said: Perhaps she is the wife of someone who is away (fighting in jihad) for the sake of Allah? And he said the same as "Umar said: then he went to the Prophet (ﷺ) and told him something similar, and he said: “Perhaps she is the wise of someone who is away (fighting in jihad) for the sake of Allah?" Then Qur'an was revealed: “And perform As-Salat (Iqamatas-Salat), at the two ends of the day and in some hours of the night [i.e. the five compulsory Salat (prayers). Verily, the good deeds remove the evil deeds (i.e. small sins), That is a reminder (an advice) for the mindful (those who accept advice)" [Hood 11:114]. He said: O Messenger of Allah, is it just for me or is it for all the people? ‘Umar struck his chest with his hand and said: No, do not think that; rather it is for all the people. And the Messenger of Allah (ﷺ) said: "ʻUmar is right."