Idries Shah said this quote

When prayer, rituals and ascetic life are just a means of self-indulgence, they are harmful rather than beneficial. This is quite obvious to people nowadays, when it is widely recognised that fixations are not the same as valuable and laudable observances. One should not pray if that prayer is vanity; rituals are wrong when they provide lower satisfactions, like emotional stimulus instead of enlightenment; he or she should not be an ascetic who is only enjoying it.