Hi Jon,
I dont want to hi-jack this thread, but thanks a lot for posting this detailed page, i was just starting to write a small custom registration form today and this has cut down my research time by a huge factor. I find it difficult to pin down in the DNN documentation where to find the various functions i need, and given the scope of the DNN API its easy to understand, but there seems not to be any detailed information on the various objects, such as userinfo.
I was wondering, i have also got a pre-created security role. Immediately following the insertion of the new user, i'd like to add them straight to that role - could you suggest how i would go about that? - also what what 'type' is DotNetNuke.Security.Membership.UserCreateStatus, so i know how to handle the variable crstat, i presume it is used to identify the success of the attempt to add a user?
EDIT:
I got it working, during my searches i stumbled on another post with the answer already contained, provided again by yourself Jon!
For anyone elses reference, this did the trick. Obviously the objuser.UserID is populated as part of the return for a successful user addition.
RoleController rc = new DotNetNuke.Security.Roles.RoleController();
rc.AddUserRole(this.PortalId,info.UserID, rc.GetRoleByName(this.PortalId, "Customer").RoleID, DateTime.MinValue);
Many Thanks, Charles
DotNetNuke.Security.Roles.