• Cong Hui 1
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I am using Sites to create a custom VF portal login page.  The custom VF portal login page works except when an invalid username and/or password is submitted.  When an invalid username and/or password is submitted, the default SF portal login page is displayed and not the current custom VF portal login page.  Is there a parameter that can be passed to the login_portal.jsp to redirect to the current custom VF portal login page.   Here is the current code:

 

 

Global pageReference login()
  {
    String startURL = 'https://naX.salesforce.com/secur/login_portal.jsp';
    startURL += '?orgId=00Dxxxxxxxxxxx&portalId=060xxxxxxxxxx&loginType=3';
    startURL += '&startURL='; 
    startURL += '&loginURL=';
    startURL += '&useSecure=true';
    startURL += '&un=' + username;
    startURL += '&pw='+ password;
    startURL += '&retURL=http://npifinancial.force.com/SmartSpend';
    
     pageReference p = new PageReference(startURL);
     p.setredirect(true);
     return p;
    
  }

 

 

  • September 22, 2010
  • Like
  • 0