How to find all users under a specific role?

How can I get all the users under a specific role? I can get the role of users using “getUserRoleNames” but I don’t know how to do it the other way around.

A little more context would be nice… I have to guess where you’re trying this…

I’m not sure this works, never tried it, but have you tried navigating the Beans normally? Roles seems to be a module in the database, and roles_users is a table. The Beans should let you retrieve this via the relationship. If not, then you can always grab it from the database with SQL.