Imaam Barbahaaree (rahimahullaah) said:

”He who loves the deeds of a people, good or bad, is just like the one who commits them.”

Shaikh Saaleh Al-Fawzaan (may Allaah preserve him) commented saying:

He who loves the deeds of a people is just like one who commits them; so if those (deeds) are good he gets a reward similar to theirs. And if those (deeds) are bad he bears the burden and sin similar to theirs. And Allaah’s Aid is sought!

And due to this it has been reported regarding the one who wishes to be like the scholar who teaches the people good will receive a reward similar to that of (that Scholar).  And the one who wishes to be like the rich person who spends his wealth in the path of Allah will receive a reward similar to that of (that rich person) in accordance with his intention.

Likewise, the opposite of this is the one who wishes to be like the criminal and the people of sin, (and) wishes to be their partners in sin or give support to their views and hold it to be true; he is like them even if he did not commit an act similar to theirs, (but) solely (due to the fact that) he held their views to be correct and took their side.

———————————————————————————————————-

[Source: It’haaful Qaaree Bitta’liqaat Alaa Sharhis Sunnah Lil Imaam Barbahaaree; Vol: 2, page: 113-114)]