For example: I have two member roles, student and teacher, and each role has its own registration page. How do I make it so that anybody who registers through the student registration automatically gets assigned a student role and can only see authorized pages?
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
Is it possible to have the same functionality using active/expired pricing plans as the trigger? So when a member purchases a plan and they're in the active period, they are assigned a role based on that plan. When they cancel their plan or their plan expires without renewal, the role would be removed?
Can anyone please check for me whats wrong with my code here ? it still doesnt change the role of this member id here, i tried everything but still same problem
import wixData from 'wix-data';import wixUsersBackend from 'wix-users-backend'; import {roles} from 'wix-users-backend'; export function button1_click(event) { assignRole("85aef24f-4a0b-4141-b40d-da3277c871cd", "a2a28bfb-9383-4b7b-aa32-645959661a3e"); } export function assignRole(roleId, memberId) { return roles.assignRole(roleId, memberId, { suppressAuth: false }) .then( () => { console.log("Role assigned to member"); }) .catch((error) => { console.log(error); }); }
I have the same question as Nathan Fuller. I want to assign a role to an individual using an automation after they purchase a product in my store, but that has not changed.
This is terrific news. I have a Lightbox via which Teachers register to my site. It was built for me, although I do have a little corvid experience. Does anyone have an idea how I could configure this lightbox registration so that all the teachers are assigned as Role: Teacher?
It's finally out! https://www.wix.com/corvid/forum/news-announcements/new-apis-assignrole-and-removerole-for-site-members
Yes! We need this right away, please. Thank you!
It's coming. We were informed a week ago that wix-users-backend has been enhanced with assignRole and removeRole functions. No ETA, but my best guess is very soon. So hold on.
I pay for a business account and this could kill a new service we are offering for online training. We NEED THIS NOW!! PLEASE PLEASE PLEASE. 🥺
Yes I agree. Not having this option makes everything I'm trying to do so very difficult. Why can labels be automatically assigned but not roles? I cannot then assign access using only labels. Come on Wix.
I see that people have been asking for this feature ever since 2018, its 2020 and still not introduced ??? we need it!!!
Its currently not possible to do that. You can only pass the details available in the Registration Options.