0

I've created a community, Public user can Register/login into community.

When Public user logged into community, salesforce provide the by default community landing page. Please check below Screenshot URL. http://prntscr.com/f3io4x

As per the above screenshot, when user click on setting, he will see the different option as per the below screnshot URL. http://prntscr.com/f3ioo5

Security setting has standard functionality to change Username/Password for the logged in User.

Now, I've to replace the standard landing page with customized VF Page. My page will like below. enter image description here

further pages of community will be like same customized vf page.

Now in this page can i write my custom functionality to change username/Password for logged in user.

is the way that I'm try to go, Is correct? Please suggest.

  • It's possible to have custom visualforce pages that handle login/passwords etc. What have you tried so far? – Nick Cook May 3 '17 at 8:42
  • @NickCook I'm trying to achieve that; Community public logged in user can able to change his Username/Password etc from customize Vf pages. – Amol May 3 '17 at 8:53
  • Are you using a template like Napili or visualforce and tabs for the community? – Dave Humm May 3 '17 at 10:07
  • @DaveHumm yes I'm using Sf+Tab Templete – Amol May 3 '17 at 10:47
0

We can create the custom VF page to change the password. salesforce provide the site.changePassword(newPassword, verifyNewPassword, oldPassword) method to change the Password. In controller of VF page we need to pass required parameter to site.changePassword(newPassword, verifyNewPassword, oldPassword). then community will change the password.

To change the username we can create a Vf page as required then create a logic in controller to update the USER record by assigning the newly Username. In this way we can change username.

you can refer the below link for site method.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_sites.htm

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.