The Messenger of Allah, peace and blessings be upon him, said, “Whoever seeks the pleasure of Allah by the displeasure of people, Allah will suffice him against the people. Whoever seeks the pleasure of people by the displeasure of Allah, Allah will leave him to the patronage of people.” Source: Sunan al-Tirmidhī /Sahih (authentic)

عَنْ عَائِشَةَ قَالَتْ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَنْ الْتَمَسَ رِضَا اللَّهِ بِسَخَطِ النَّاسِ كَفَاهُ اللَّهُ مُؤْنَةَ النَّاسِ وَمَنْ الْتَمَسَ رِضَا النَّاسِ بِسَخَطِ اللَّهِ وَكَلَهُ اللَّهُ إِلَى النَّاسِ
2414 سنن الترمذي كتاب الزهد باب منه