function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
WmohanWmohan 

Validation of password

I have created a site to enter email and password.  The object used is contact, the fields used is contact.email and contact.password__c.

 

After the user enter the email and password, I have already placed to check for the existance of email, blank values etc.

 

I would like to check whether the password entered by the user is the same as what is there in the record corresponding to the email entered.

 

Not sure how to figure the logic.  any body can advice?

Best Answer chosen by Admin (Salesforce Developers) 
sushant sussushant sus

Hi,

Through getset you will get ur password and email id in controller , query in contact  object where email id you get from get set ;

 

then compare your password with query password if it match then redirect to next page else add apexpage error  mesaages.

All Answers

NanthaNantha

Hi Mohan.,

 

R u trying to authenticate the user using contact object or real salesforce user for the site which u r creating?

sushant sussushant sus

Hi,

Through getset you will get ur password and email id in controller , query in contact  object where email id you get from get set ;

 

then compare your password with query password if it match then redirect to next page else add apexpage error  mesaages.

This was selected as the best answer