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
Sfdc profSfdc prof 

Site.validatePassword(User u, Password, Confirm Password) using the org wide Password Policies

Hello Community, 

Currently We are implementing Salesforce Community with Custom Registration page and using the Site.ValidatePassword standard method to validate the password.
Now since we are sending new User to be created as a parameter to this Method.
We were under impression that the Profile level Password Policies will be enforced but unfortunately its taking Org Wide Password Policies which we dont want. 

Please note the User is yet to be created but we assigned the Profile ID to the new User instance that is getting passed as parameter to above method.

Can you please confirm if the we are missing something here ?

Thank you,
Suraj TripathiSuraj Tripathi
Hi Ganesh,
If I am not wrong!, there is your password policies are same in your system administration and particular profile, Firstly you should Change the password policies from the particular profile.
You have to go to profile and select the particular profile where you want to change, and changes according you want.

1: Select The particular profile and scroll down,

User-added image

2:  Edit the Password Policies​:

User-added image


Hope it Helps you. Please mark this as solved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.

Regards ,

Sfdc profSfdc prof
Thanks Suraj for your response. As I am aware of setting up org wise and profile level password policies as we already did that. The question here is that instead of using profile level password policies above method using org level password policies that we don't want. Hope to hear from you soon