Hi I’m confused about the members area. When I used the wix version of the members area it seems to auto-login the user after registration. To meet my requirements I had to build my own, so I use this call in my backend code to register the user:
After registration I was expecting the user to be logged in, but they are not. What is the correct approach to have the user get to a logged inn state ?
No, that will all depend on how you set up your original approval setting, which was probably set as automatically approve as default.
Edit the general member settings:
Who can be a member?
Choose who can be a member of your site:
Everyone: When a new member signs up, they are approved automatically. You do not need to do anything.
People I approve: When a new member signs up, you receive a notification, both by email and in your site’s dashboard, asking if you want to approve or reject them. Only those who you approve become site members.
You can make a custom signup form through Wix Forms:
Or you can create your own custom login and signup lightboxes instead, however if you do this option, then you will need to edit your signup settings as this:
Have a read of the apis here for the code options
I’m not using the wix members area, so this doesn’t apply. I have the approval set to approve everyone.
To login a user after registration you need to run the registration code client side, which means on the page itself using wix-users API
If you register the user using the register function from wix-users-backend then it means you are registering them server-side which will not do anything on the page.