I have person accounts enabled and i am trying to allow my users to self register for communities and i am looking to configure the CommunitiesSelfRegController apex class to allow it. I understand adding a profile id and a role id but i cant understand why i have to add an account id. I understand why it needs to attach the user to an account but i don't want to attach them to an existing account, that doesn't make any sense for me and my business case (i cant see how it would suit most people but anyway). So i think i am asking: Is there a way that i can get this class to allow users to self register and it will create them an (person) account and a user with community access? or Is there a way to create a separate object and make a form which inserts all of the data i need then use a trigger or something to create a record on accounts, enable it for communities and create the appropriate user.
I hope i have made sense. I'm not a trained developer and i'm getting a bit out of my depth. Thanks in advance and all help is much appreciate.
Adam