1) The Prophet (sallallahu ‘alayhi wa sallam) said: “What I fear for you the most is the minor shirk, that is ar-riya. Allah will say on the Day of Judgement when He is rewarding the people for their actions: Go to those for whom you did riya for in the world then see if you find the reward with them.” Related by Musnad Ahmed (5/428, 429)
2) The Prophet (sallallahu ‘alayhi wa sallam) said: “Shall I not inform you of what I fear for you more than the Masih ad-Dajjal? It is the hidden shirk. It is when a man stands up for prayer, then beautifies his prayer for another to look at.” Related by Ibn Majah (2604)
My question in relation to the meaning of these Hadith is: does it apply to people who performed worship or did good deeds for the sake of riya and/or does it also apply to people who performed worship and did good deeds for the sake of Allah, but then later on implemented the intentions/thoughts of riya. Please confirm what the Muhadithun say in regards to this. JazakAllah.