Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6901951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:44:16+00:00 2026-05-27T07:44:16+00:00

I have a custom portal integrated with a custom site, using Apex/Visualforce. I want

  • 0

I have a custom portal integrated with a custom site, using Apex/Visualforce. I want to provide custom password change functionality on a Visualforce page that’s enabled for the site/portal.

The Site static class method is hardly documented and after combing developerforce.com and coming up empty, I figured I would try here. Here’s the method (found in the sample ChangePasswordController class)

Site.changePassword(newPassword, verifyNewPassword, oldpassword);

Here’s the kicker. Regardless what data I enter for these values, including respecting all password policies, the method simply returns null and does nothing. It’s interesting that in the sample test method provided by Salesforce the assert literally proves this to be the case:

/**
 * An apex page controller that exposes the change password functionality
 */
public with sharing class ChangePasswordController {
    public String oldPassword {get; set;}
    public String newPassword {get; set;}
    public String verifyNewPassword {get; set;}        

    public PageReference changePassword() {
        return Site.changePassword(newPassword, verifyNewPassword, oldpassword);
    }     

    public ChangePasswordController() {}

    public static testMethod void testChangePasswordController() {
        // Instantiate a new controller with all parameters in the page
        ChangePasswordController controller = new ChangePasswordController();
        controller.oldPassword = '123456';
        controller.newPassword = 'qwerty1'; 
        controller.verifyNewPassword = 'qwerty1';                

        System.assertEquals(controller.changePassword(),null);                           
    }    
}

Thanks in advance for any assistance with this!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:44:17+00:00Added an answer on May 27, 2026 at 7:44 am

    Do you have an <apex:pageMessages> element on your VF page? Perhaps the Site class is setting an error message, which you wouldn’t see unless you have this element on the page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a custom master page that is deployed to My Site, as well
I have custom classes that I currently instantiate within App.xaml as resources. I want
I have custom groupViews that need to change state when they are expanded and
I am using http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/portal/portal.html to build a portal. Obviously, i have custom windows inside
We have our own custom calendar in our portal which is developed in Java.
We have custom headers in the Silverlight DataGrid using the ContentTemplate. We've got a
I have a few models that need to have custom find conditions placed on
We have a custom list that has a column called Connection Date and need
I have custom radar tiles that I am trying to overlay over Google Maps
I have created a custom content type that has a ReferenceField. When I set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.