Sunan an-Nasa'i, Volume 2, Book 15, Hadith 1434 (DarusSalam) ⓘ
It was narrated that Ya'la bin Umayyah said: "I said to 'Umar bin Al-Khattab: 'There is no sin on you if you shorten salah and if you fear that the disbelievers may put you in trial (attack you). But now the people are safe.' 'Umar said: 'I wondered the same thing, so I asked the Messenger of Allah about that and he said: This is a favor from Allah (SWT) to you, so accept His favor."
أَخْبَرَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، قَالَ أَنْبَأَنَا عَبْدُ اللَّهِ بْنُ إِدْرِيسَ، قَالَ أَنْبَأَنَا ابْنُ جُرَيْجٍ، عَنِ ابْنِ أَبِي عَمَّارٍ، عَنْ عَبْدِ اللَّهِ بْنِ بَابَيْهِ، عَنْ يَعْلَى بْنِ أُمَيَّةَ، قَالَ قُلْتُ لِعُمَرَ بْنِ الْخَطَّابِ { لَيْسَ عَلَيْكُمْ جُنَاحٌ أَنْ تَقْصُرُوا، مِنَ الصَّلاَةِ إِنْ خِفْتُمْ أَنْ يَفْتِنَكُمُ الَّذِينَ كَفَرُوا } فَقَدْ أَمِنَ النَّاسُ . فَقَالَ عُمَرُ رضى الله عنه عَجِبْتُ مِمَّا عَجِبْتَ مِنْهُ فَسَأَلْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنْ ذَلِكَ فَقَالَ " صَدَقَةٌ تَصَدَّقَ اللَّهُ بِهَا عَلَيْكُمْ فَاقْبَلُوا صَدَقَتَهُ " .
also referenced under: Hadith 1433 (Reference) & Book 15, Hadith 1 (In-Book)