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
Nic 121Nic 121 

How do you set a user's new password on a custom community change password visualforce page?

Hey,

I'm building a site that consists of a customer community which is accessed only through custom visualforce pages.  Here I am trying to build a custom change password page.  I have built the page, set it as the change password page under community management, but I am unsure of how to actually change the password in the backend.

I cannot use setPassword(Id, newPassword) as that gives a 500 error when executed from a site.  I cannot use Site.changePassword(newPassword, verifyNewPassword, oldPassword) as the old password has been forgotten by the user.

I am using the standard forgot password functionality.  By this I mean, the user can select 'forgot password', enter their email, recieve the standard change password email, and then follow the link in the email which takes them to the change password page.  Following this link also appears to log the user in, which would suggest that the user has been given a temporary password.  Perhaps this password can be accessed for use with the changePassword method?  Is there a different method altogether?  How is this implemented in the standard change password page?

Cheers for helping
Nic 121Nic 121
Is bumping a thing here? If so, bump.

So, any ideas anyone?

If no one answers, do I start a case?

Cheers
Nic 121Nic 121
I guess bumping is not a thing.  After half an hour of search I have found the hidden link of mystery that lodges a case.  Thanks guys
 
Nic 121Nic 121
Okay, although there is a link, the dev support form is disabled and links to the index page of this site.  All UX out the window.
Nic 121Nic 121
Okay, support cases get immediately closed.  Support does not exist.