It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever performs his prayer beautifully and well in the presence of people, where people can see him, but when he is alone performs it badly (in a very deficient way), then this is indeed a contempt and belittling of his Lord which he displays towards his Lord."
This hadith is hasan (good).
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / كتاب الرقائق / 3213
Hadith Gradingمحدثین:إسناده حسن
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :قال ابن حجر: هَذَا حَدِيثٌ حَسَنٌ . » «أخرجه السنن الكبرى للبيهقي برقم: 3641، وأخرجه مسند أبي يعلى برقم: 5117، وأخرجه مصنف عبد الرزاق برقم: 3738، وأخرجه مصنف ابن أبي شيبة برقم: 8490»