@UserRoles, ComputedText & Page

I have placed on a Page the following Computed Text: @UserRoles. Simple enough except it only returns the first Role for a user. I have 3 Roles assigned to me and only the 1st one is ever displayed.

I tried @Explode( @UserRoles; " ,;"; 0; 1 ) to try to place the Roles on separate lines, but still only see 1 Role.

Anyone have a solution?

Subject: Implode instead

@UserRoles values are returned as an array (text list), you need to implode them to see all of the list.

@implode(@userroles;", ");

However if you wanted to see if the user contained specific roles, it’s easier to use

@ismember(“[Sales]”; @userroles);