Get User By Role

The WIX UI exposes the same functionality I am trying to implement. How does WIX do it?