You need to sign in to do that
Don't have an account?

Site.createPortalUser() bugs bugs bugs
Hi
This took us a long time to discover but the following two
scenarios will cause the method: Site.createPortalUser() to throw a
bug big time.
1) if the Account ID passed to this method refers to an account
which its owner is a portal "Guest" user or is from a "Customer portal profile". (hint: Portal guest does not
have a role)
2) If the Account ID passed to this method refers to an account which its owner is an inactive user.
I hope this helps those who are struggling to understand what is going wrong with their sites:
This is the error message we receive:
There was an error in registering a user for site registrations. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact <a href="mailto:support@salesforce.com">support@salesforce.com</a>. Please indicate the URL of the page you were requesting as well as any other related information. We apologize for the inconvenience. <br/><br/>Thank you again for your patience and assistance. And thanks for using Salesforce.com! <br/><br/>Error ID:1521060844-1426 (-2007103269)