Bismillaah Al-Hamdulillaah wa salatu wa salaamu 'ala rasulullaah Amma ba'd
Abondoning actions for the sake of the people Author: Shaykh 'Abdul-'Azeez ibn 'Abdullaah ar-Rajhi Source: http://shrajhi.com/, via the old Masjid 'Uthaimeen Website
Question: Is the one who abandons an action for the sake of the people (committing a form of) riyaa` (showing off)? Like the person who has a habit of praying the night prayer and he travels with a group of people who do not pray the night prayer, so he abandons it, because he is afraid that he may fall into riyaa`.
The Scholars say: Actions for the sake of the people is shirk  and abandoning actions for the sake of the people is also shirk. And the one free (or exempted) from this is the one whom Allaah pardons. It is upon a person to struggle with his own soul and not leave off the actions. He should struggle with his own soul. If he abandons the actions for the sake of the people, then he has fallen into riyaa`.
Performing actions for the sake of the people is riyaa` and abandoning the actions for the sake of the people is also riyaa`. But it is upon the man to struggle with his own soul and seek assistance from Allaah and not abandon the actions. Yes. Perhaps he will be a role model. Perhaps there is a benefit in it, that he will be a role model (for the other people).
 Translator's Note: The type of shirk the Shaykh is referring to here is hidden shirk.
Subhanak Allaahuma wa bihamdika ash-hadu anlaa illaaha illa anta astaghfiruka wa atubu ilayk
If I said anything correct, then it is from Allaah (subhanahu wa taa'ala), and if I erred, then that is from me and shaytan.