You can very easily add two required fields without coding. Simply do the following:
1. Login as the Administrator
2. Go to User Accounts
3. Click on Manage Profile Properties
4. Add them ... make them required and visible and they will show up during registration. You can even order and group them. If you already have users they will be required to update their profile on next login.
What I did on one project was actually just create a Module that effectively creates a user as an end result. I placed that on a page and configured DNN to not allow Registration. Then I created a link for non-authenticated users which directs registration to that page. Here's some VB.NET code I use to create a user:
' Insert
Try
Dim oUserInfo As New UserInfo
oUserInfo.Profile.InitialiseProfile(Me.PortalId)
oUserInfo.PortalID = Me.PortalId
oUserInfo.IsSuperUser = False
oUserInfo.Membership.Approved = True
oUserInfo.Username = txtUsername.Text.Trim
oUserInfo.FirstName = txtFirstName.Text.Trim
oUserInfo.LastName = txtLastName.Text.Trim
oUserInfo.DisplayName = txtDisplayName.Text.Trim
oUserInfo.Email = txtEmailAddress.Text.Trim
oUserInfo.Profile.SetProfileProperty("Some_ProfileProperty", txtSomeProfileProperty.Text.Trim)
oUserInfo.Profile.TimeZone = dnnTimeZone.Value
oUserInfo.Profile.PreferredLocale = dnnPreferredLocale.Value
' Role
Dim oRoleController As New DotNetNuke.Security.Roles.RoleController
If rblRole.Items.FindByText("Some Role").Selected Then
oRoleController.AddUserRole(Me.PortalId, oUserInfo.UserID, oRoleController.GetRoleByName(Me.PortalId, "Some Role").RoleID, Nothing)
ElseIf rblRole.Items.FindByText("Some Other Role").Selected Then
oRoleController.AddUserRole(Me.PortalId, oUserInfo.UserID, oRoleController.GetRoleByName(Me.PortalId, "Some Other Role").RoleID, Nothing)
End If
' Password
oUserInfo.Membership.Password = txtPassword.Text.Trim
' Save
Dim oUserCreateStatus As Security.Membership.UserCreateStatus = DotNetNuke.Entities.Users.UserController.CreateUser(oUserInfo)
If Not oUserCreateStatus = Security.Membership.UserCreateStatus.Success Then
Select Case oUserCreateStatus
Case Security.Membership.UserCreateStatus.DuplicateUserName
' Throw
Throw New Exception("Username is already taken.")
Case Security.Membership.UserCreateStatus.InvalidEmail
' Throw
Throw New Exception("Email is invalid.")
Case Security.Membership.UserCreateStatus.InvalidPassword
' Throw
Throw New Exception("Password is invalid.")
Case Security.Membership.UserCreateStatus.InvalidUserName
' Throw
Throw New Exception("Username is invalid.")
Case Security.Membership.UserCreateStatus.UserAlreadyRegistered
' Throw
Throw New Exception("This User is already registered.")
Case Security.Membership.UserCreateStatus.UsernameAlreadyExists
' Throw
Throw New Exception("Username already exists.")
Case Else
Throw New Exception("Unable to Add User due to an unknown error.")
End Select
End If
Another solution would be to buy something like this:
http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&PackageID=10957
Lastly, you could customize what's there but the Registration process is buried in multiple ASCXs and just plain difficult to augment. I even had a hard time doing something as simple as adding a cookie to remember Username to login and it took quite some time to get it right with the complexity of the User account setup components.