عَنِ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ أَيُّمَا رَجُلٍ ادَّعَى إِلَى غَيْرِ وَالِدِهِ أَوْ تَوَلَّى غَيْرَ مَوَالِيهِ الَّذِينَ أَعْتَقُوهُ فَإِنَّ عَلَيْهِ لَعْنَةَ اللَّهِ وَالْمَلَائِكَةِ وَالنَّاسِ أَجْمَعِينَ إِلَى يَوْمِ الْقِيَامَةِ لَا يُقْبَلُ مِنْهُ صَرْفٌ وَلَا عَدْلٌ
It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Noble Prophet (peace and blessings be upon him) said: Whoever claims to be the child of anyone other than his father, or a freed slave attributes his allegiance to anyone other than his masters who freed him, then upon him is the curse of Allah, the angels, and all people until the Day of Judgment. Neither his voluntary nor obligatory acts of worship will be accepted.