Access the new Members Role in Wix Code?

Finally you can add roles in Wix and even setup Page Access to different roles.


This is amazing, but how I can access the name of the Role through Wix Code. Really important for us to get that information into the Role property of the logged in user.

2 Likes

The API for accessing role information for a user is coming soon.

Hello, Is it already possible to use the Roles in the Code?

I have the same question. I need to use the Roles in the code

I see that we can getRole() using Wix Code but how do we set the role from Wix Code?

I have asked the same question in this post https://www.wix.com/code/home/forum/community-discussion/issue-getting-current-role-and-pricing-plan-of-a-user

No answer on it, Hopefully this post will have more luck than mine.

Hello Sam,
Do you have any estimation when set a role in code will be implemented?
Thanks
\

Hello, is this out yet? Been almost a year but still haven’t been able to figure this out. Thanks.

Role information on Wix Code?

Still not able to set a user’s role with Wix Code. Is it there and I just can’t find it, or is it still “coming soon”?

@Sam any ETA on this? Or is there already another solution?

on form submit assign user role would be very helpful.