Allah had established truth upon his tongue and in his heart, and he was a man granted inspiration. It is therefore not surprising that someone like him, even while planning the deployment of his army during prayer, could have a degree of attentiveness that others did not possess. Yet there is no doubt that his attentiveness would be greater without this. Nor is there any doubt that, in its outward actions, the prayer of the Messenger of Allah—may Allah bless him and grant him peace—was more complete in a state of security than in a state of fear. If Allah has waived certain outward obligations in a state of fear, what, then, of the inward ones?
In short, thinking during prayer about an obligation for which time may be running short is not like thinking about something that is not obligatory, or about an obligation for which time is not running short. Umar may have had no opportunity to think about managing the army except at that moment, since he was the leader of the Muslim community and faced many demands.
Everyone encounters such situations according to his station. A person continually recalls during prayer things that he does not recall outside it. Some of this comes from Satan. For example, it is related that a man told one of the early Muslims that he had buried some money but had forgotten where. He told him, “Get up and pray.” The man got up and prayed, and remembered the place. When asked, “How did you know that?” he replied:
“I knew that Satan would not leave him alone during prayer without reminding him of something to distract him, and nothing mattered more to him than remembering where he had buried the money.”
Nevertheless, the discerning servant strives for complete attentiveness while fully carrying out everything else he has been commanded to do. There is no power and no strength except through Allah, the Most High, the Magnificent.