Search…
Resources
Related Links
userRoles
To return the role of a given user
Get back all roles the current or a given user is assigned to in a workspace (team) with this function. The result is an array with the role names.

Syntax

userRoles()
userRoles(user)

Return

[string]

Examples

userRoles() To return all roles of the current user.
userRoles()
Result: admin, LeadershipTeam, World Savior (if Captain America is processing this function, and "LeadershipTeam" and "World Savior" are assigned roles.
​
userRoles(myUser) To return all roles of a given user.
Choose the field "User" and select "Steve Rogers".
userRoles(User)
Result: admin, LeadershipTeam, World Savior (if Captain America is selected in the field "User", and "LeadershipTeam" and "World Savior" are assigned roles).

See also

​user, which returns the current or a specific user.
​userHasRole, which returns "true" if a user has a given role.
​userRole, which returns the role of a user.
Last modified 8mo ago
Export as PDF
Copy link