Get user Roles based for a given user id (not current user)

Hey there.

Does anyone know if there is a way to retrieve the roles for a user based on user id?

I know you can get roles for the current user (wixUsers.currentUser.getRoles():wink:

But I would like to be able to get the roles for any user ie

wixUsers.getUserById(userId).getRoles();

Anyone have thoughts on this and whether it is possible?

Just make a query to a database where you store the user role for each user id

Perhaps I’m missing something. Is it possible to query the system databases? Is there somewhere we can see these collections?