Just to clarify you are in Site Manager>Administraton>Users>select user>Custom Fields tab?
If you're setting visibility in the code behind on that custom fields page, you can simply use this code:
UserInfo ui = (UserInfo)EditedObject;
ui.IsInRole("roleName", "siteName");
If you're using it somewhere else, there is already a macro that will do this by using
CurrentUser.IsInRole("roleName", true)
I know the latter doesn't help with getting a selected user. You may want to post your macro code and registration to ensure it is correct.