We’ve recently migrated wix-users and wix-users-backend APIs to the new wix-members and wix-members-backend namespaces. This change clarifies the terminology and puts these APIs where you would expect to find them. We’ve also added some long-awaited new functions-
Moving forward, all related new APIs will be in the new wix-members and wix-members-backend namespaces. Learn more
Feel free to share your feedback!
Hello Adi,
I am using the Wix package "Google SSO Integration" whose latest version was published on July 6 2021, which was not long before this announcement of the release of the new "wix-members" APIs.
The "@velo/google-sso-integration" Wix package is VERY useful, but unfortunately is using the deprecated "wix-users" library instead of the more future-proofed "wix-members" library.
My question is whether you can ask the development team about when they will be releasing a newer version that supports "wix-members"?
If its not too long, then I can wait. Otherwise I'm forced to copy re-factor it myself, which breaks the support in the future.
Much thanks for a response
@Maksim Norkin , Has there been any progress made on the 'loggedin' function?
Any update @Maksim Norkin on the seperate function?
We're working on adding this as a separate function
Thanks for the reply.
I was looking for the "loggedIn" property that was previously available with the wixUsers.currentUser API.
Is there a wix-members "function" that may be used similar to this:
if (wixUsers.currentUser.loggedIn) {some code...}; ???
A boolean test for whether the current user is logged in...
I've looked and can't seem to find any.
Thank you for your explanation @Maksim. Can I run something by you to check if I'm using the members backend API in the right way?
I have a membership site with multiple ways for customers to get access to paid content:
They can buy a pricing plans
They can buy a customized product
I have made a backend validation script to check if a customer has access to the paid content when they go to certain pages. Non-paying customers can still access these pages, but they will get less content on them. For (1) I check the contact labels using wix-crm-backend. For (2) I wanted to use extended fields, also through wix-crm-backend. However I seem to get some issues when trying to set the extended fields.
When someone buys the custom product, I use
a) the backend authentication.register function if they are not a site member, to give them an account on the site.
b) the backend members.updateMember function if they are already a member
I was able to set the necessary extended field with (a) but not with (b) and the two seem to need a different syntax, which I didn't fully figure out yet.
But now I'm also wondering if I'm actually going about this in the right way. You are mentioning that the extended fields in contacts are a platform for the custom fields in members. They need to be connected in the 'customize info' screen of the site members. The custom field will then appear in the member account screen, however I don't really want customers to be able to set this field themselves, because they needs to purchase the product to get access.
I wonder if you could give clarification on how to set/update custom fields with wix-members backend. There seems to be a difference in method between members.updateMember and authentication.register. In the documentation of 'updateMember' the custom fields parameters are an object, in 'register' they are not described as objects.
@verbaldancing pls try again
I'm seem to run into a little bit of trouble with the new members.getMember functions in the backend. I can't return the 'FULL' fieldsets when I call these functions from a backend event such as wixPaidPlans_onPlanPurchased. I can only get the public info and not the full info, for example to get a client's e-mail address.
Recent update: We released wix-members-backend events.
Documentation: https://www.wix.com/velo/reference/wix-members-backend/events
the profile system still has a bit of sluggish loading... do you intend to improve this?the profile system still has a bit of sluggish loading... do you intend to improve this?
You guys rock!