In a book called Ta'leemul Haq, it states:
This implies that omitting niyat invalidates salah.
However, the Prophet Muhammad (SAWS) said:
عَنْ أمِيْرِ الْمُؤْمِنِيْنَ أَبِيْ حَفْصٍ عُمَرَ ابْنِ الْخَطَّابِ رَضِيَ اللهُ عَنْهُ قَالُ سَمِعْتُ رَسُوْلَ اللهِ صَلَّى اللهُ عَلَيْهِ وَ سَلَّمَ يِقُوْلُ إنَّمَا الأَعْمَالُ بِالنِّيَّاتِ وَ إنَّمَا لِكُلِّ امْرِىءٍ مَا نَوَى فَمَنْ كَانَتْ هِجْرَتُهُ إلَى اللهِ وَ رَسُوْلِهِ فَهِجْرَتُهُ إلَى اللهِ وَ رَسُوْلِهِ وَ مَنْ كَانَتْ هِجْرَتُهُ لِدُنْيَا يُصِيْبُهَا أوِ امْرَأةٍ يَنْكِحُهَا فَهِجْرَتُهُ إلَى مَا هَاجَرَ إلَيْهِ رَوَاهُ إمَامَا الْمُحَدِّثِيْنَ أبُوْ عَبْدِ اللهِ مَحَمَّدُ بْنُ إسْمَاعِيْلَ بْنِ إبْنِ إبْرَاهِيْمَ بْنِ الْمُغِيْرَةِ بْنِ بَرْدِزْبَهْ الْبُخَارِيُّ وَ أبُوْ الْحَسَيْنِ مُسْلِمُ بْنُ الْحَجَّاجِ بْنِ مُسْلِمٍ الْقُشَيْرِيُّ النَّيْسَابُوْرِيُّ فِيْ صَحِيْحَيْهِمَا اللَّذَيْنِ هُمَا أصَحُّ الْكُتُبِ الْمُصَنَّفَةِ
On the authority of Ameer ul-Mu’mineen (the Commander of the Faithful), Abu Hafs `Umar ibn al-Khattab radiAllahu anhu, who said: I heard the Messenger of Allah sallAllahu alayhi wa sallam say:
“Actions are but by intentions and every man shall have only that which he intended. Thus he whose migration (Hijrah to Madeenah from Makkah) was for Allah and His Messenger, his migration was for Allah and His Messenger, and he whose migration was to achieve some worldly benefit or to take some woman in marriage, his migration was for that for which he migrated.
Reported in Bukhari and Muslim
So how can niyat be omitted if actions are according to intentions. If one is doing salah, they are intending to perform salah and thus that is there niyat?