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
Dan_GruDan_Gru 

customizing 'change password' page for customer portal users. How?

Hello.

 

Did anyone customize default change password page for customer portal users?

 

By now where the new user registered he recieve new(automatig generated) password. So, when he first time log in portal he redirects to "https://cs1.salesforce.com/_ui/system/security/ChangePassword" that is default page. How can i change it?

 

Now log process performed in this way:

 

-user comes to site page.

-he log to site using his portal user login and password. If it non-correct (site.login() function return null) he are still on this page with error message. If it correct the form with action portal_login.jsp pulled by entered values and submitted. After this user redirects to default portal tab. But! If he logg first time the result of portal_login.jsp is 'https://cs1.salesforce.com/_ui/system/security/ChangePassword'. How can i change it?

 

Will be wery gratefull for solution.

Pradeep_NavatarPradeep_Navatar

Changepassword is a site page and you can customize your code inside that page. When you login into component, it will redirect to your customized page. On providing wrong username and password it will show error message :

 

In component

                 <script>

                 setTimeout("ShowE()",1000);

                 function ShowE(){

                 var msgE = "{!IF(NOT(ISNULL(propMessage)),propMessage,'')}";

                 if(msgE != null && msgE != "") alert(msgE);

                 }

                 </script>

 

      Controller:

             transient String strMsg = '';

             String propMessage  { get {return strMsg;} set{strMsg = value;} }

             if(ApexPages.hasMessages())

             {

                     ApexPages.Message[] apm = ApexPages.getMessages();

                     for(ApexPages.Message am : apm)

                             {

                                  if(strMsg != null && strMsg != '')

                                        strMsg = strMsg + '  ' + am.getSummary();

                                  else

                                        strMsg = am.getSummary();

                              }

              }

 

Hope this helps.

rtyanasrtyanas

Pradeep_Navatar was helpful in getting messages wihtout having to use:

<apex:pageMessages id="error"/>

 

On a custom site apex:pageMessages does not come up correctly using your code I was able to give the correct error message using a controller variable.