Yes I want 'To remove the administrators from the list of users on any login that is not the administrator.' Here removal means only to not able to see the administrator by other user roles.
For example, if an editor logged-in in wp-admin he will see all users in wordpress normally, but I want a way so that other users will available in list excluding administrator (i.e. hidden administrator users).
I hope it is clear to you now.
By the way, I found the solution for what I want, here:
using 'pre_user_query' action.
I put this function below yours JPB_User_Caps class code and it all done in total !! :)
But above function is limited to hide the particular admin using id or username. Can this converted in some way to check on basis of 'administrator' capability to hide all 'administrator' role users?
Further I am thinking, to put this extended action inside your class or map_meta_cap function in additional switch case.. whatever ?
Could you help me in this?