I will be adding new roles frequently using the plugin Members and I only want the users with the same role to see each other.
I found a code on https://rudrastyh.com