Hi,
I have a form that I created that populates a Database called ListeMembres.
I would like to code something that will check if a record exists for the email entered at Login/Signup. Following the result of this check, I want to Hide or Show a textbox.
Nayeli,
just to confirm if I understand correctly, this code will only deal with the Member Collection (List of registered members in Contacts on the web site) maintained when they Login or Subscribe. It has nothing to do with the database created and maintained by the profile form?
I have created 3 buttons on the Login page.
1- Login/Logout
2- Profile
3- To direct the user to the site itself after he would have Loggedin/Subscribed and fill the Profile.
I have Collapse the site Menu on the Login page and will expand it only if the user has registered/Loggedin AND fill the profile for additionnal information about him.
I would like to do the following:
If the user isnât registered to the Member Collection, then force him to Subscribe and to fill the Profile
If he is already registered to the Member Collection, Show him my âGo to buttonâ so he can access the site with the menu Extended
I would like to give access to my site only to registered members that also have filled the Profile
What I want is a Login process that would request additional fialds not just Email and password.
There are different approaches you can take depending on what you want Approved members to see or do.
For example if you want them to sign up but not view the âprofileâ button until you manually approve them, then one approach would be to add an extra field/column in your database that says something like âApprovedâ or âAccessâ. Then you can have profile button hide upon login and only appear if âApprovedâ is checked off or says âyesâ, etc.
While there are many approaches you can take, the pattern of logic stays the same: hide button/section if a field/column is empty.
Nayeli,
I want to do the same as the Member Login Application does. When the new member fill the Login form and he is not already in the contact list of the site, it goes pending approval until the site owner goes into the contact list of the site and approves it.
Is there a way to do this without adding a new field into the db. What about this function:
I found this in the API references. Can we add this to your code?
Register a user as a site member with manual approval
import wixUsers from âwix-usersâ;
// âŚ
let email = // the userâs email addresses
let password = // the userâs password
wixUsers.register(email, password)
.then( (result) => {
let status = result.status; // âPendingâ
let approvalToken = result.approvalToken;
let user = result.user;
} );