Sunan Ibn Majah, Volume 5, Book 37, Hadith 4207 (DarusSalam)

It was narrated from Jundab that the Messenger of Allah said: “Whoever wants to be heard of, Allah will make him heard of, and whoever wants to be seen, Allah will show him (i.e., expose his real motives).”

حَدَّثَنَا هَارُونُ بْنُ إِسْحَاقَ، حَدَّثَنِي مُحَمَّدُ بْنُ عَبْدِ الْوَهَّابِ، عَنْ سُفْيَانَ، عَنْ سَلَمَةَ بْنِ كُهَيْلٍ، عَنْ جُنْدَبٍ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏ "‏ مَنْ يُرَاءِ يُرَاءِ اللَّهُ بِهِ وَمَنْ يُسَمِّعْ يُسَمِّعِ اللَّهُ بِهِ ‏" ‏ ‏.‏

sunnah.com