Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Update User ProfileUpdate User Profile
Previous
 
Next
New Post
11/24/2007 12:16 PM
 

I'm trying to update the user profile in a custom module. Everything works, except in the userprofile table it creates/updates the profile properties for the null portalid (host) instead of my current portalid (0 in this case). Any ideas on why this happens or how to make it update using the propertydefintionid for the current portal?

        Public Sub UpdateProfile()
            Try
                Dim user As New Users.UserInfo()
                user.Profile.InitialiseProfile(PortalId)

                user.Username = UserInfo.Username
                user.UserID = UserInfo.UserID
                user.Profile.FirstName = UserInfo.FirstName
                user.Profile.LastName = UserInfo.LastName
                user.Membership.Email = UserInfo.Email

                If Trim(txtStreet.Text) <> "" Then
                    user.Profile.Street = txtStreet.Text
                End If

                If Trim(txtUnit.Text) <> "" Then
                    user.Profile.Unit = txtUnit.Text
                End If

                If Trim(txtCity.Text) <> "" Then
                    user.Profile.City = txtCity.Text
                End If

                If ddlState.SelectedValue <> "" Then
                    user.Profile.Region = ddlState.SelectedValue
                End If

                If ddlCountry.SelectedValue <> "" Then
                    user.Profile.Country = ddlCountry.SelectedValue
                End If

                If Trim(txtZip.Text) <> "" Then
                    user.Profile.PostalCode = txtZip.Text
                End If

                If Trim(txtPhone.Text) <> "" Then
                    user.Profile.Telephone = txtPhone.Text
                End If

                Users.UserController.UpdateUser(PortalId, user)
            Catch ex As Exception
                lblDebug.Text += "<br>Update Profile:" & ex.Message.ToString
            End Try
        End Sub

 
New Post
11/24/2007 1:59 PM
 

where do you get the value of ProfileId variable from?


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Update User ProfileUpdate User Profile


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out