I heard it from the Messenger of Allah ﷺ quite audibly and not secretly: Behold! the posterity of my fathers, that is, so and so, are not my friends. Verily Allah and the pious believers are my friends.
سَمِعْتُ رَسُولَ اللَّهِ ﷺ جِهَارًا غَيْرَ سِرٍّ يَقُولُ أَلاَ إِنَّ آلَ أَبِي يَعْنِي فُلاَنًا لَيْسُوا لِي بِأَوْلِيَاءَ إِنَّمَا وَلِيِّيَ اللَّهُ وَصَالِحُ الْمُؤْمِنِينَ