I create a DNN profile programtically and then send out a verification email, but the verification code and other details are blank (see below).
Email content is below (I've changed the url)
Portal Website Address http://www.webaddress.com/
> Username:
> Password:
> Verification Code:
>
> You may use the following link to complete your verified registration:
>
> http://www.webaddress.com/default.aspx?ctl=Login&username=p4at1%40sketchbookfilms.com&verificationcode=
The code being used to create the profile is as follows:
var oUser = new UserInfo();
oUser.PortalID = PortalId;
oUser.Membership.Username = txtEmail.Text;
oUser.Username = txtEmail.Text;
oUser.DisplayName = txtFirstName.Text + " " + txtLastName.Text;
oUser.Profile.FirstName = txtFirstName.Text;
oUser.FirstName = txtFirstName.Text;
oUser.LastName = txtLastName.Text;
oUser.Profile.LastName = txtLastName.Text;
oUser.Email = txtEmail.Text;
oUser.Membership.Email = txtEmail.Text;
oUser.Membership.Approved = false;
oUser.Membership.Password = txtPassword.Text;
UserCreateStatus createstatus = UserController.CreateUser(ref oUser);
I then use the following statement to send out the email if user has been successfully created
Services.Mail.Mail.SendMail(oUser, Services.Mail.MessageType.UserRegistrationVerified, PortalSettings);
But for some reason I sometimes get blank details in the email.