Is it permissible to inform People about One Who does not pray, in order to warn Them against Him?
Question :
If I know that some person does not pray, nor mention Allah; in fact, on top of this, he is guilty of evil deeds which cause Allah's wrath and that of His Messenger in every way, is it allowed to censure him, in order to let the people know about him, or is it not permissible for me to do so?
Answer:
You must advise him first, ordering him to do what Allah has commanded him to do and forbidding him from doing what Allah prohibited for him; and if he obeys, even if only little by little, continue advising him as much as you are able; if he does not, then avoid him as much as you can, in order to evade the possibility of Fitnah and to stay clear of evil.
After that, it is permissible for you to mention his neglectful behavior regarding the obligatory acts of worship and the sins he commits, whenever there is a need, in order to make people aware of it and protect them from his evil. This could even be an obligation on you, if someone asked your advice about having him as a neighbor, a business partner or an employee for example, or you feared that he would exert his influence upon a person and affect him with his evil in these cases, it would be incumbent upon you to announce what you know about him in order to save the people of goodness from his evil, and in the hope that he might be restrained (from sin) if he knew that the people were avoiding him and shunning his company.
But you must not take his evil deeds as a source of diversion or amusement for yourself and the people, or as gossip when sitting in company, as this is spreading of evil and causes depression of the soul and makes it cold to hearing evil deeds. Nor must you attribute to him sins which he did not commit, in order to revile and defame him more, because this is lying and false accusation and it has been forbidden by the Prophet.
Source:
Ibn Baz
Fatawa Islamiyah, Vol. 2 Pages 357