I have created a custom application to update user profile information. I am using DNN 4.9. Here is a sample of code(in VB):
Dim user As DotNetNuke.Entities.Users.UserInfo = DotNetNuke.Entities.Users.UserController.GetUser(PortalId, GridView1.SelectedValue, True)
Dim txtBoxFirstName As TextBox = CType(DetailsView1.FindControl("TextBoxFirstName"), TextBox)
user.Profile.SetProfileProperty("FirstName", txtBoxFirstName.Text)
Dim txtBoxLastName As TextBox = CType(DetailsView1.FindControl("TextBoxLastName"), TextBox)
user.Profile.SetProfileProperty("LastName", txtBoxLastName.Text)
user.DisplayName = txtBoxFirstName.Text & " " & txtBoxLastName.Text
Dim txtBoxEmail As TextBox = CType(DetailsView1.FindControl("TextBoxEmail"), TextBox)
user.Profile.SetProfileProperty("Email", txtBoxEmail.Text)
Everything works fine except the email won't update. I have also tried this code:
user.Email = txtBoxEmail.Text
but that doesn't work either. Any advice on how to get this working would be greatly appreciated.
Thanks!