Custom Member Registration

Do you want your own branded membership registration form? Need more information about your users when they register as members? Want to add custom logic to the registration approval process? Then, we’ve got some news for you!

Using the new functionality in the wix-users API you can now take control of how users register as members of your site. The API allows you to register a new site member with a simple function call. That means you can easily implement your own custom registration form. Your form can contain your site’s branding and you can use it collect whatever information you want.

The new functionality also includes ways for you to email new members and control how they are approved. This allows you to create more advanced approval flows.
For example, you can write code for the following flows:

  • Email verification - New pending members receive an email with a verification link that they need to click before receiving final approval.

  • 3rd party verification - New pending members can be vetted by a call to a 3rd party service before receiving final approval.
    The following APIs have been added. For more information and examples click the links to be taken to the API Reference:

wix-users - For working with your site’s users from client-side code.

  • register() - Registers a new site member.

  • emailUser() - Sends an email to the currently logged-in site member.

  • applySessionToken() - Logs the current user into the site using a session token returned by any of the following backend functions: approveByEmail(), approveByToken(), or register().

wix-users-backend - For working with your site’s users from backend code.

  • register() - Registers a new site member.

  • approveByEmail() - Approves a pending member using an email address.

  • approveByToken() - Approves a pending member using an approval token returned when calling the register() function.

  • blockByEmail() - Blocks a member from logging into the site using an email address.
    We’ve also added functionality relating to your site’s Contact List in the new wix-crm module. You can now create a new contact programmatically and send an email to the new contact.

wix-crm - For working with your site’s contacts from client-side code.

wix-crm-backend - For working with your site’s contacts from backend code.

13 Likes

See this article for a basic example of working with the new registration APIs. Another, more advanced example is coming soon.

4 Likes

Does this also allow us to create a login screen too? Or only regIster?

2 Likes

Great news!
Is there a way to build a custom registration page with SSO?

Hi Yoav ,Sam,

Great update and a much awaited feature. But one doubt. Can we modify the current Membership registration form with all these code and API access? Or do we need to make a separate login page , signup page/lightbox by ourselves ? It would be nice if we can modify the current and already available signup page/lightbox with custom labels and input fields so that the transition to the new feature will be much easier… Anyway thanks for the new update…

2 Likes

A tutorial on the custom sign up page!

10 Likes

I would like to be able to manipulate buttons on wixmenu to show the login screen like the mobile menu shows.

Because it’s annoying when your trying to minimize elements that you can’t have the login button built into the menu bar. And it would change state and show the relevant menus and buttons on the menu.

In the editor the login screen menu would show as an actual page or a link at least?

Sadly this doesn’t provide for single sign on per se. But it does push the ball forward a jot with allowing better control of site members.

Some problems I have encountered with the crm api (which holds site member information and should be the source of SSO).

  1. You have to know about a member to be able to manage that member information.
  2. It is not clear what permissions are needed to create members or what privileges the member gets.
  3. When adding custom fields it is not clear what the database key representation is. So if I create a custom column in the Contact List called “Anniversary Date” does this become ‘anniversaryDate’ or ‘AnniversaryDate’ or should I use ‘Anniversary Date’? Guidlines might help here.
  4. The contact list app only seems to show a single phone number or email address (and doesn’t let you enter more than one of each although there is the possibility of adding multiple email addresses per contact).
  5. Contact duplication safeguards: There should be rules that prevent multiple contacts being added with the same email address(es). I have been able to create 5 contacts with the same primary email address in the Contact List. emails should be unique and this should help manage duplications (and again be the basis for SSO :-)).
5 Likes

@Yoav and team. I’d appreciate an answer to this bug report… https://www.wix.com/code/home/forum/questions-answers/wix-crm-labels-bug

Felipe - did you solve your problem? The bug report thread provides you with a suggested resolution but it’s not clear if that worked for you. (I added a note there too :wink:

Dear Sam(wix), from your post on 10 June above, any chance the new advanced code example is ready to be shared? =)

Solo Packer I think there is still some work to be done. I just added some additional info on this related post that Wix needs to connect the dots on.

Hi All, I was able to create a custom registration lightbox and a login lightbox. In order to make it work, I have to enable the custom registration in the sign-up settings. Here is my problem. When I click on the login button it always takes me to the registration page. I have tried creating a link to the login lightbox. It goes to the login lightbox and it won’t go through from there. Second problem, when I use the Paid Plans app, It does the same thing. After selecting the plan, it takes the user to the registration page even if the user is logged in. Any ideas around this?

Any update on the advanced example? :slight_smile:

Hi ‘Wix Trix’:

Can I suggest that you create a new post with this question and a couple of other pieces of information. That way if your problem has a unique solution it will be easier to find than if it is buried in this thread.
You can add a link to your post here for continuity if you like.

  • The additional pieces of information would be the link(s) to pages that you have that can be looked at to see the problem in action.

  • Some insight about the use you might have of custom designed data collections

  • Identify if you are using any specific wix apps (wix-blog, wix-forum etc.).
    As an example, when you say " enable custom registration in the sign-up settings " what are you referring to?

Hope we can help you out!

Cheers
Steve

Hi Steve, Thank you for the note. I was able to work around this by removing the member account bar and building a custom login/my account/ logout button. I will post the question in a new post since it is still an issue. Thank You.

1 Like

Can I do data comparison for the sign up validaiton?
Example: Can I check if the new user registering is in my contact list? If they are then complete registration, if not then they cannot register.
Example 2: Or I can have a second database table with list of pre-filled contact data. When new user registers through the form, I can check that table for existing info. If that contact is preexisting, then new user registers sucessfully.

Are either of these scenarios possible with wix’s code? Thanks!

Hi IronTank
You cannot read from the CRM api. The Wix-users api allows multiple registrations which show up in the crm dashboard but again are not gettable.

The best way to go is to create your own data collection and track new registrations and contacts in it. There is a Wix tutorial that show you how to do this here

Hope this helps

Steve

@stcroppe Thanks for the quick reply!
I have read it, it’s quite useful. It shows I can create a collections for member area.
However, I don’t want anyone to register and need a “check” for new users.

So, can I create two collections, one for “new users”. Second collections for “allowed users” where I will pre-fill data (for example) email. So, when user registers, I can check “allowed users” collections, if this email exists… then new user is entered into “new users” collections for website access? Is there a tutorial for this?

Hi IronTank:

The thing you need to do is check your local Member data collection for a pre-existing record with a matching email AND a returned contactId (this means that you have stored this email in the CRM database). Potentially record any errors that occur when trying to create a contact record so that you know that calling createContact will likely fail.

When you publish your live site you may need to prepopulate the member data collection with existing CRM records to prevent failures due to bad synchronization between the CRM records (showing up in the dashboard) and your Member data collection.

Does that make sense?

1 Like