List users per role

Admin Console of HR.Net allows only to list users by their primary role. And secondary roles are in a shade.
To display all users that belong to a particular role (primary or secondary) you can use this bit of sql:

select ur.userid, rl.rolename
from oc_roles r
	inner join oc_rolelanguages rl on r.roleid = rl.roleid
	inner join oc_userroles ur on ur.roleid = r.roleid
where rl.rolename = 'Role Name'
This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *