Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
suyuti:2077a

“If a person prays in public and does it well, and he prays in secret and does it well, then Allah says: ‘This man is truly My slave.’” (Using translation from Ibn Mājah 4200)   

السيوطي:٢٠٧٧a

"إذا صلَّى العبُد في العلانيةِ (فأحسْنَ) ، وصلى في السرِّ فأحسن، قال الله تعالى: أحسن عبدى".  

الرافعي عن أبي هريرة

See similar narrations below:

Collected by Ibn Mājah, Suyūṭī
ibnmajah:4200Kathīr b. ʿUbayd al-Ḥimṣī > Baqiyyah > And Rqāʾ b. ʿUmar > ʿAbdullāh b. Dhakwān Abū al-Zinād > al-Aʿraj > Abū Hurayrah

“If a person prays in public and does it well, and he prays in secret and does it well, then Allah says: ‘This man is truly My slave.’”  

ابن ماجة:٤٢٠٠حَدَّثَنَا كَثِيرُ بْنُ عُبَيْدٍ الْحِمْصِيُّ حَدَّثَنَا بَقِيَّةُ عَنْ وَرْقَاءَ بْنِ عُمَرَ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ ذَكْوَانَ أَبُو الزِّنَادِ عَنِ الأَعْرَجِ عَنْ أَبِي هُرَيْرَةَ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ إِنَّ الْعَبْدَ إِذَا صَلَّى فِي الْعَلاَنِيَةِ فَأَحْسَنَ وَصَلَّى فِي السِّرِّ فَأَحْسَنَ قَالَ اللَّهُ ﷻ هَذَا عَبْدِي حَقًّا  

suyuti:5722a

“If a person prays in public and does it well, and he prays in secret and does it well, then Allah says: ‘This man is truly My slave.’” (Using translation from Ibn Mājah 4200)   

السيوطي:٥٧٢٢a

"إِنَّ الْعَبْدَ إِذَا صَلَّى في الْعَلانِيَة فَأحْسَنَ، وَصَلَّى فِي السِّر فَأَحْسَن قَال اللهُ ﷻ: هَذَا عَبْدِي حقًّا".  

[هـ] ابن ماجة عن أَبي هريرة