How to custom database when user login

Hi everyone!
I have a database for members of the company.
I want the Client to log in to the website, and there will be constraints between the client fields entered and my member database.
Only when the client fields are 100% identical to the company’s database will the client log into my website.
How to do it for my case?
Please help me

You can perform a search on the collection for a specific email, name, DOB etc and make a condition statement to perform a certain action.

For example matching a user by title:

import wixData from 'wix-data';  
// ...  

wixData.query("myCollection")   
.eq("title", "Dr.")   
.find()   
.then( (results) => {     
if(results.items.name ==='yourCondition') {
   //do something with user     
   } else {
   // handle case where no matching items found     
   }   
   } )   
   .catch( (err) => {     
   let errorMsg = err;   
   } ); 

Check out the reference: https://www.wix.com/corvid/reference/wix-data.html#query

You will also find this article Velo Tutorial: Building Your Own Members Area | Help Center | Wix.com helpful, specifically ‘Log in’ and ‘Code’ sections.

1 Like