I am trying to understand how the self registration for customer portal works. I came across , https://developer.salesforce.com/page/Authenticating_Users_on_Force.com_Sites and http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_sites.htm which clearly explains the process except one thing.
When self registration is enabled, SiteRegisterController is created. this controller creates new portal user. As a part of this we need to pass the account id that will get associated with the Contact under portal user.
Code in the above links suggests that we can hard code the accountid. Does this mean all new portal users will have the same account ? How the account id is passed during self registration if users from Account A and Account B wants to register on the customer portal?