How to create/register three different user types without using Wix Member Area?

We are working on a site with three different user types, and because of that we can’t use the Wix Member Area because that only supports one user type. We’ve tried to code this using Corvid, but our attempts haven’t worked thus far. Does anyone know how we would go about making three kinds of users and taking them through the signup/login process? These types all have different sign up/log in/registration pages, which are fully built, we just need to know how to connect them and the data that goes through them. We have the data from the sign-up connected to the database, that’s not an issue.

We tried using these, but they didn’t work:

This is the default Wix code:

import wixUsers from ‘wix-users’;
import wixLocation from ‘wix-location’;

$w.onReady( function () {
$w(‘#logIn’).onClick( function (){
let email = $w(‘#email’).value;
let password = $w(‘#password’).value;
wixUsers.login(email,password)
.then(()=>{
wixLocation.to(‘/EmployerRegistration’);
})
})

});

And this is another one we tried:

import wixUsers from ‘wix-users’;
import wixLocation from ‘wix-location’;
import wixWindow from ‘wix-window’;

$w.onReady( function () {
$w(“#forgotPassword”).onClick( (event) => {
//wixWindow.lightbox.close()
wixUsers.promptForgotPassword()
.then( ( ) => {
//
} )
. catch ( (err) => {
let errorMsg = err; //“The user closed the forgot password dialog”
});
});
});

export function loginButton_click(event) {

let email = $w(“#email”).value;
let password = $w(“#password”).value;

wixUsers.login(email, password)
.then( () => {
console.log(“User is logged in”);
wixLocation.to(“/Student-Profile/”); //Change the URL ending to whatever page you want to send the user to after they log in.
} )
. catch ( (err) => {
console.log(err);
} );
}

Any help would be appreciated, ASAP!! Thank you.

When people sign up to your website they all become Site Members.
There are three types of users:

  • Visitor - A user who is not logged into your site.

  • Member - A user who is logged into your site.

  • Admin - The owner of the site.

You have to manually add the specific member role to their profile through the Contacts List in your Dashboard.
https://support.wix.com/en/article/creating-member-roles-6943237
https://support.wix.com/en/article/managing-your-member-roles

You can then set your pages up to be member role specific too.
https://support.wix.com/en/article/limiting-pages-on-your-site-to-specific-members-member-roles

Then on your login lightbox, you can simply use Wix Users API to get the current user and their role and then move them onto the correct page after they have logged in.
https://www.wix.com/corvid/reference/wix-users.User.html