If a slanderer repents, can his testimony be accepted?
Question

If a slanderer repents from his slander and mends his ways, can his testimony be accepted or not?.
Praise be to Allah.Allaah has stipulated three punishments for slander. They are: the hadd punishment; rejection of testimony; and describing the slanderer as an evildoer (Faasiq). 
Allaah says (interpretation of the meaning): 
“And those who accuse chaste women, and produce not four witnesses, flog them with eighty stripes, and reject their testimony forever. They indeed are the Faasiqoon (liars, rebellious, disobedient to Allaah).
5. Except those who repent thereafter and do righteous deeds; (for such) verily, Allaah is Oft‑Forgiving, Most Merciful”
[al-Noor 24:4-5]. 
With regard to the hadd punishment, the fuqaha’ are unanimously agreed that the hadd punishment for slander is eighty lashes if the slanderer is a free person [i.e., not a slave], man or woman, because Allaah says (interpretation of the meaning):  
“flog them with eighty stripes”
[al-Noor 24:4]. 
As for his testimony not being accepted, the scholars are unanimously agreed that the testimony of the slanderer should not be accepted so long as he has not repented, because he has committed a major sin, namely slander, and has not repented from it, so he cannot be described as being of good character, and good character is a condition of testimony being accepted; and because he is a liar and an evildoer according to the text of the verse: “They indeed are the Faasiqoon (liars, rebellious, disobedient to Allaah).” 
“Why did they not produce four witnesses? Since they (the slanderers) have not produced witnesses! Then with Allaah they are the liars”
[al-Noor 24:13]. 
The testimony of the evildoer and liar cannot be accepted, because Allaah says (interpretation of the meaning): “And take as witness two just persons from among you (Muslims)” [al-Talaaq 65:2]. So it is stipulated that the witness should be of good character, and the evildoer and liar are not of good character. 
If he repents from slander and admits that he was lying, then the majority of scholars (Maalik, al-Shaafa’i and Ahmad) are of the view that his testimony may be accepted. They said: 
1.Because repentance erases the sins that came before it, so if he repents his sin and its effects are erased completely, and non-acceptance of testimony is one of the effects of that sin.
Imam al-Shaafa’i said in al-Umm (7/94): 
If he admits that he lied, his testimony may then be accepted, but if he does not do that then his testimony cannot be accepted, until he does that, because the sin for which his testimony is rejected is slander, but if he admits that he was lying then he has repented. End quote. 
2.Because the expression “forever” in the verse applies so long as he persists in evildoing. Hence after that the verse mentions after the ruling that he is an evildoer: “and reject their testimony forever. They indeed are the Faasiqoon (liars, rebellious, disobedient to Allaah).” If the description of evildoer ceases to apply to him, then the reason for rejecting his testimony also ceases to exist.
3.It was narrated from ‘Umar (may Allaah be pleased with him) that he said to those who had slandered al-Mugheerah ibn Shu’bah, after he had carried out the hadd punishment of flogging on them: “Whoever repents, his testimony will be accepted.” Narrated by al-Bukhaari in a mu’allaq majzoom report.
His repentance means that he admits that he was lying about the slandered person whom he accused of zina. Hence the words of ‘Umar according to Ibn Jareer were, “Whoever admits that he was lying, his testimony will be accepted.” 
If the slanderer repents and mends his ways, his testimony will be accepted, like any other Muslim of good character. 
Al-Mughni (12/386); al-Majmoo’ (22/98-101). 
And Allaah knows best.