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

ChangePassword not passing correct old password


I am using a custom Site.


When a user forgets their password there is an option where I can reset the password then send it to their email address.  using this call which works fine:




When the user tries to log in for the first time using their new password they are directed to the Site defined

Change Password VF  user interface/Page.  The change password process is to populate the first apex:inputSecret field with the old password.  This old password is always wrong.


Site.changePassword(newPassword, verifyNewPassword, oldpassword);  


This call works as designed, it is telling me that the old password is wrong.  When I enter the correct password it works fine.  It is only when the ChangePassword VF page is displayed with the wrong old password is where I am having problems.


Is there a work around for getting the correct old password?  Can I make give me the correct old password?






When you type in the oldPassword for the site.changepassword method are you using the original password or the password sent in the email?



Thanks for your response..


When I log in with the new generated password for the first time the change password screen is displayed

giving me the option to create a password I can remember.  The old password is added to the old password field

from the previous screen.  I'm not sure how this happens.


Any ideas?